Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba for excel
How can I make subs in Userform modules be available in
standard modules? I think it might have something to do with declaration, but I have problems doing it. Thanks for helping. Yehuda |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba for excel
You need to put the subs in general modules and call them from the userform
module if you need to do this. -- Regards, Tom Ogilvy "Yehuda" wrote in message ... How can I make subs in Userform modules be available in standard modules? I think it might have something to do with declaration, but I have problems doing it. Thanks for helping. Yehuda |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba for excel
Access it with normal class notation.
Userform1.Subname make sure nothing is private. Keith www.kjtfs.com -----Original Message----- How can I make subs in Userform modules be available in standard modules? I think it might have something to do with declaration, but I have problems doing it. Thanks for helping. Yehuda . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba for excel
To do this 'cleanly' not only should the procedure be
public, but the userform ought to be loaded into memory Sub test() Dim temp As UserForm1 Set temp = New UserForm1 Load temp temp.helloworld Unload temp Set temp = Nothing End Sub Calling the procwill by default force open the userform In general, place important subs in a standard module, make sure that they're public , then you code in other modules etc will be able to use them. If you don't wanta public sub available to the macro list on the workbook, then mark the module as Option Private Module Patrick Molloy Microsoft Excel MVP -----Original Message----- Access it with normal class notation. Userform1.Subname make sure nothing is private. Keith www.kjtfs.com -----Original Message----- How can I make subs in Userform modules be available in standard modules? I think it might have something to do with declaration, but I have problems doing it. Thanks for helping. Yehuda . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|