Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Private Sub Workbook_Open() doesn't run Steve Starr Excel Discussion (Misc queries) 4 April 3rd 11 05:05 AM
Private Sub() - Sub() CousinExcel Excel Discussion (Misc queries) 2 January 18th 10 01:39 PM
Private sub problem sby Excel Worksheet Functions 1 November 28th 07 04:50 PM
Common Private Sub Booker Excel Discussion (Misc queries) 1 November 15th 05 08:50 AM
Private sub Mark New Users to Excel 3 April 6th 05 03:36 PM


All times are GMT +1. The time now is 01:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"