Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call Event and Load Form based on Variable
Hi all,
I have some problem with dynamic things : 1) I need to call an event which the event name was saved in a variable. Eg : Dim sEventName as String sEventName = "Button1_Click" Call sEventName 2) And how to load Form based on variable too? Eg : Dim sFormName as String sFormName = "Form1" Load sFormName Hope someone can help me to solve the problems. Thanks a lot! Resant |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call Event and Load Form based on Variable
use Application.run
Application.Run sEventName http://support.microsoft.com/kb/157609/en-us XL97: How to Display a UserForm Whose Name Is in a Variable -- Regards, Tom Ogilvy "Resant" wrote in message ups.com... Hi all, I have some problem with dynamic things : 1) I need to call an event which the event name was saved in a variable. Eg : Dim sEventName as String sEventName = "Button1_Click" Call sEventName 2) And how to load Form based on variable too? Eg : Dim sFormName as String sFormName = "Form1" Load sFormName Hope someone can help me to solve the problems. Thanks a lot! Resant |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call Event and Load Form based on Variable
Wonderful!
You save my time... Thanks a lot Tom |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call Event and Load Form based on Variable
Tom,
More question.... Is there any coding that could tell what the last macro that have been run from other Workbook? Thanks, Resant |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call Event and Load Form based on Variable
Not Unless you have the macro write that information someplace where you can
access it; there is no built in support for it. -- Regards, Tom Ogilvy "Resant" wrote: Tom, More question.... Is there any coding that could tell what the last macro that have been run from other Workbook? Thanks, Resant |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to call the event of other worksheet | Excel Worksheet Functions | |||
How to call an event procedure | Excel Programming | |||
user form-on open event? keydown event? | Excel Programming | |||
how to call a macro from a worksheet event? | Excel Programming | |||
call a sub with arguments from Worksheet_FollowHyperlink event | Excel Programming |