View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default 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