Calling a private sub
Make it public, but give it a do-nothing argument, it can't get c alled
from Excel then. -- HTH ------- Bob Phillips "Al" wrote in message ... Hi All. Im not sure that this is possible. I have some code in the ThisWorkbook module. I want this code to call a procedure in a standard module, however the procedure is private ( i.e private sub blah() ) I'm currently trying to do one, but i get a "Member or data method not found" error. I would like to keep the private sub private, as it will mess-up the workbook beyond repair if called seperately. Does anyone know how to get this to work? Cheers. Al |
Calling a private sub
Hi Bob,
Thanks for below. However i'm unsure on how to do that. I've tried sub Blah(Do-Nothing) and sub Blah(DoNothing) but they don't work. Searching, i can't find anything. Can you give anymore info. Cheers. "Bob Phillips" wrote: Make it public, but give it a do-nothing argument, it can't get c alled from Excel then. -- HTH ------- Bob Phillips "Al" wrote in message ... Hi All. Im not sure that this is possible. I have some code in the ThisWorkbook module. I want this code to call a procedure in a standard module, however the procedure is private ( i.e private sub blah() ) I'm currently trying to do one, but i get a "Member or data method not found" error. I would like to keep the private sub private, as it will mess-up the workbook beyond repair if called seperately. Does anyone know how to get this to work? Cheers. Al |
Calling a private sub
Al,
You Need to add the argument to the macro Public Sub Blah(dummy) .... End Sub and just ignore the dummy argument. -- HTH ------- Bob Phillips "Al" wrote in message ... Hi Bob, Thanks for below. However i'm unsure on how to do that. I've tried sub Blah(Do-Nothing) and sub Blah(DoNothing) but they don't work. Searching, i can't find anything. Can you give anymore info. Cheers. "Bob Phillips" wrote: Make it public, but give it a do-nothing argument, it can't get c alled from Excel then. -- HTH ------- Bob Phillips "Al" wrote in message ... Hi All. Im not sure that this is possible. I have some code in the ThisWorkbook module. I want this code to call a procedure in a standard module, however the procedure is private ( i.e private sub blah() ) I'm currently trying to do one, but i get a "Member or data method not found" error. I would like to keep the private sub private, as it will mess-up the workbook beyond repair if called seperately. Does anyone know how to get this to work? Cheers. Al |
Calling a private sub
Thanks Bob,
I understand now. Thanks again for your help. Cheers. Al "Bob Phillips" wrote: Al, You Need to add the argument to the macro Public Sub Blah(dummy) .... End Sub and just ignore the dummy argument. -- HTH ------- Bob Phillips "Al" wrote in message ... Hi Bob, Thanks for below. However i'm unsure on how to do that. I've tried sub Blah(Do-Nothing) and sub Blah(DoNothing) but they don't work. Searching, i can't find anything. Can you give anymore info. Cheers. "Bob Phillips" wrote: Make it public, but give it a do-nothing argument, it can't get c alled from Excel then. -- HTH ------- Bob Phillips "Al" wrote in message ... Hi All. Im not sure that this is possible. I have some code in the ThisWorkbook module. I want this code to call a procedure in a standard module, however the procedure is private ( i.e private sub blah() ) I'm currently trying to do one, but i get a "Member or data method not found" error. I would like to keep the private sub private, as it will mess-up the workbook beyond repair if called seperately. Does anyone know how to get this to work? Cheers. Al |
All times are GMT +1. The time now is 09:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com