![]() |
Sub that cannot be executed from Excel
Hi,
I would like to have a Sub that cannot be executed from Excel. The sub doesn't have a parameters inside. Does the solution is to put a non used parameters inside? Thanks! Alex -- Alex St-Pierre |
Sub that cannot be executed from Excel
Take any sub and export to a .bas file
Then delete the sub and the module that held it. -- Gary's Student "Alex St-Pierre" wrote: Hi, I would like to have a Sub that cannot be executed from Excel. The sub doesn't have a parameters inside. Does the solution is to put a non used parameters inside? Thanks! Alex -- Alex St-Pierre |
Sub that cannot be executed from Excel
Alex
You're correct....if the sub has an argument, even an optional one, it won't be available via: [alt]+[F8] Example...This sub will be available: Sub AllCanSeeMe() 'MsgBox "Rats! you see me." End Sub But, this one will NOT be Sub NoneCanSeeMe(Optional DummyArg As Integer) 'MsgBox "Rats! you see me." End Sub Does that help? *********** Regards, Ron XL2002, WinXP "Alex St-Pierre" wrote: Hi, I would like to have a Sub that cannot be executed from Excel. The sub doesn't have a parameters inside. Does the solution is to put a non used parameters inside? Thanks! Alex -- Alex St-Pierre |
Sub that cannot be executed from Excel
Just to add:
I could type in the name in the dialog (Alt+F8) and run it with no problem. True, it doesn't show as one of the choices. -- Regards, Tom Ogilvy "Ron Coderre" wrote in message ... Alex You're correct....if the sub has an argument, even an optional one, it won't be available via: [alt]+[F8] Example...This sub will be available: Sub AllCanSeeMe() 'MsgBox "Rats! you see me." End Sub But, this one will NOT be Sub NoneCanSeeMe(Optional DummyArg As Integer) 'MsgBox "Rats! you see me." End Sub Does that help? *********** Regards, Ron XL2002, WinXP "Alex St-Pierre" wrote: Hi, I would like to have a Sub that cannot be executed from Excel. The sub doesn't have a parameters inside. Does the solution is to put a non used parameters inside? Thanks! Alex -- Alex St-Pierre |
Sub that cannot be executed from Excel
Very true, of course.
Regarding: if the sub has an argument, even an optional one, it won't be available via: [alt]+[F8] "listed" would have been a better word than "available". *********** Regards, Ron XL2002, WinXP "Tom Ogilvy" wrote: Just to add: I could type in the name in the dialog (Alt+F8) and run it with no problem. True, it doesn't show as one of the choices. -- Regards, Tom Ogilvy "Ron Coderre" wrote in message ... Alex You're correct....if the sub has an argument, even an optional one, it won't be available via: [alt]+[F8] Example...This sub will be available: Sub AllCanSeeMe() 'MsgBox "Rats! you see me." End Sub But, this one will NOT be Sub NoneCanSeeMe(Optional DummyArg As Integer) 'MsgBox "Rats! you see me." End Sub Does that help? *********** Regards, Ron XL2002, WinXP "Alex St-Pierre" wrote: Hi, I would like to have a Sub that cannot be executed from Excel. The sub doesn't have a parameters inside. Does the solution is to put a non used parameters inside? Thanks! Alex -- Alex St-Pierre |
All times are GMT +1. The time now is 12:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com