![]() |
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 |
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 |
All times are GMT +1. The time now is 11:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com