![]() |
Sub () that does NOT appear in Macro selection
Is there a way to have a Sub () not appear in the macro selection (alt f9) ?
|
Sub () that does NOT appear in Macro selection
Private Sub yourMacroNmae()
"J@Y" wrote: Is there a way to have a Sub () not appear in the macro selection (alt f9) ? |
Sub () that does NOT appear in Macro selection
On Jul 13, 11:46 am, Mike wrote:
Private Sub yourMacroNmae() "J@Y" wrote: Is there a way to have a Sub () not appear in the macro selection (alt f9) ? If a sub has a parameter then it won't appear. private sub yourMacroName(dummy as object) Just pass in a 0 Peter |
Sub () that does NOT appear in Macro selection
Quick and simple. Thanks!
"Mike" wrote: Private Sub yourMacroNmae() "J@Y" wrote: Is there a way to have a Sub () not appear in the macro selection (alt f9) ? |
Sub () that does NOT appear in Macro selection
I just noticed that Private subs from other modules can't be called. Is there
a way around this? " wrote: On Jul 13, 11:46 am, Mike wrote: Private Sub yourMacroNmae() "J@Y" wrote: Is there a way to have a Sub () not appear in the macro selection (alt f9) ? If a sub has a parameter then it won't appear. private sub yourMacroName(dummy as object) Just pass in a 0 Peter |
Sub () that does NOT appear in Macro selection
On Jul 13, 12:16 pm, J@Y wrote:
I just noticed that Private subs from other modules can't be called. Is there a way around this? " wrote: On Jul 13, 11:46 am, Mike wrote: Private Sub yourMacroNmae() "J@Y" wrote: Is there a way to have a Sub () not appear in the macro selection (alt f9) ? If a sub has a parameter then it won't appear. private sub yourMacroName(dummy as object) Just pass in a 0 Peter Don't put the word private on it. Peter |
Sub () that does NOT appear in Macro selection
Hi J@y, private subs are normally used for ThisWorkbook, Worksheet and
Control Event code such as Workbook_Open, Wordsheet_Activate and UserForm_Click. They are not intended to work except for that specific environment. If the designer wants code to be public and able to be called from anywhere in the project, then the code needs to be written in the general modules which are named Module 1, 2, etc. and do not precede the word sub with the word private. "J@Y" wrote: I just noticed that Private subs from other modules can't be called. Is there a way around this? " wrote: On Jul 13, 11:46 am, Mike wrote: Private Sub yourMacroNmae() "J@Y" wrote: Is there a way to have a Sub () not appear in the macro selection (alt f9) ? If a sub has a parameter then it won't appear. private sub yourMacroName(dummy as object) Just pass in a 0 Peter |
All times are GMT +1. The time now is 10:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com