excel - Local (workbook-specific) functions without using VBA or VSTO -
i looking way create workbook-local functions in c++ (unmanaged). vba not appropriate use case. unfortunately, that's way know of create workbook-local function. (i'm not terribly familiar vsto, there may way there, cannot used managed code this.) know how create functions xlls, , know how create automation addin exposes functions through idispatch. however, both of these seem global functions only.
does know way this?
worksheet != workbook
i don't know of way create worksheet-local functions.
in vba expose functions need standard module (.bas) without option private module
option set, exposing public function
- function usable in every worksheet of workbook that's containing it.
a worksheet class module, , lives object instance: public function
members therefore not usable worksheet functions.
functions workbook-local, not worksheet-local.
now, that's meant anyway, given add-in approach being referred creating "global" functions, available workbooks.
as @rubberduck hinted, creating code via vbide library doesn't require elevation , security settings tweaking if you're extending vbe itself. this might help (it's entry point add-in @rubberduck , working on). add-in edits, deletes , adds code in vbe living, , doesn't require tweaking macro security settings.
Comments
Post a Comment