Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make Function Accessible only from VBA
Hi,
I have a few UDFs that should only be callable from VBA (they are meaningless as spreadsheet functions). Does anybody know how to make a UDF invisible to the spreadsheet, but visible to any/all VBA modules? I don't think the "Private" designation is appropriate because it makes the UDF invisible to all other VBA modules. An example of this would be the MsgBox function, which is callable from any VBA module, but not callable directly from a spreadsheet. Thanks in advance for any help. Ryan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make Function Accessible only from VBA
Hi Ryan,
Using the Option Private Module directive will prevent public functions from being displayed in the function wizard. If the user knows the exact name and argument list they can still enter the function in a cell and it will get called, but this isn't normally a problem. I'm pretty sure the only way to prevent any use in a worksheet function is to either make your functions private or wrap them in a class module and use them in your VBA project through an instance of the class. -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Ryan Poth" wrote in message ... Hi, I have a few UDFs that should only be callable from VBA (they are meaningless as spreadsheet functions). Does anybody know how to make a UDF invisible to the spreadsheet, but visible to any/all VBA modules? I don't think the "Private" designation is appropriate because it makes the UDF invisible to all other VBA modules. An example of this would be the MsgBox function, which is callable from any VBA module, but not callable directly from a spreadsheet. Thanks in advance for any help. Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
form option buttons - how can I make them accessible? | Excel Discussion (Misc queries) | |||
how do I make a template accessible | Excel Discussion (Misc queries) | |||
Why Would Add-In Modules Not Be Accessible? | Excel Discussion (Misc queries) | |||
How do I make sure my Wkbook is accessible to users using earlier | Excel Discussion (Misc queries) | |||
How do I make a text box accessible in a protected Excel sheet? | Excel Worksheet Functions |