Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
According to Walkenbach, Private "indicates that the
Function procedure is accessible only to other procedures in the same module", and "when you create a function that should be used only in a VBA procedure, you should declare it Private so that users don't try to use it in a formula". That is exactly the behavior that I want. But when I create the following functions, both are callable from formulas in the spreadsheet: function foo1(x) foo1 = foo2(x) end function private function foo2(x) foo2 = x end function My intent is that the spreadsheet can have =foo1(1), but not =foo2(2). However, the latter works :-(. Bottom line: How can I declare function foo2 so that it is callable only from the procedures in the same module and specifically not callable from formulas in spreadsheets? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
=SUBSTITUTE(C4,"~?#","") will this work to remove multiple string | Excel Worksheet Functions | |||
how does this formula work: =LOOKUP(2,1/((COUNTIF(D6:D41,""&D6:D41)=0)*(D6:D41<"")),D6:D41) | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
pictures to work with "data" "sort" option | Excel Discussion (Misc queries) | |||
How does "Private" work | Excel Programming |