Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scope of private function
I have declared a private function in a VBA Module, but a get a "Sub or
Function not defined" error when called from a UserForm. Any ideas? Thanks in advance. Oscar |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scope of private function
That is because the scope is restricted to the module that the private
procedure is within. To make it available to another module it must be Public. You can have the procedures public but private to the project (that is not accessible from another project, and not in the macros list in Excel), by making the procedure public and by adding the phrase Option Private Module to the module declarations at the start. -- __________________________________ HTH Bob "oscar.c.marin" wrote in message ... I have declared a private function in a VBA Module, but a get a "Sub or Function not defined" error when called from a UserForm. Any ideas? Thanks in advance. Oscar |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Scope of private function in VBA Module | Excel Programming | |||
scope of private function called from UserForm fails | Excel Programming | |||
Improve method of calling a private function in a private module | Excel Programming | |||
variable scope question in user-defined function | Excel Programming | |||
Calling Private Sub/Function | Excel Programming |