Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with private sub
Hello NG,
I use private sub so that my code will not be run via Tools|Macro|Macros. However, it seems that a private sub can only be called by a procedure within the same module. My problem is that I have a several userforms that also need to call those private sub. e.g a command button that will do some validation then call the procedures. Pleas help! TIA Jon-jon |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with private sub
Conrado
sub whatEver (Optional x as integer) 'your code here end sub Will not display in Tools|macros but can be called by other modules. Neil "Conrado Capistrano" wrote in message ... Hello NG, I use private sub so that my code will not be run via Tools|Macro|Macros. However, it seems that a private sub can only be called by a procedure within the same module. My problem is that I have a several userforms that also need to call those private sub. e.g a command button that will do some validation then call the procedures. Pleas help! TIA Jon-jon |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with private sub
Neil,
That was great. thanks, Jon-jon "Neil" wrote in message ... Conrado sub whatEver (Optional x as integer) 'your code here end sub Will not display in Tools|macros but can be called by other modules. Neil "Conrado Capistrano" wrote in message ... Hello NG, I use private sub so that my code will not be run via Tools|Macro|Macros. However, it seems that a private sub can only be called by a procedure within the same module. My problem is that I have a several userforms that also need to call those private sub. e.g a command button that will do some validation then call the procedures. Pleas help! TIA Jon-jon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Private Sub Workbook_Open() doesn't run | Excel Discussion (Misc queries) | |||
Private Sub() - Sub() | Excel Discussion (Misc queries) | |||
Private sub problem | Excel Worksheet Functions | |||
Common Private Sub | Excel Discussion (Misc queries) | |||
Private sub | New Users to Excel |