Call Event and Load Form based on Variable

  • Thread starter Thread starter Resant
  • Start date Start date
R

Resant

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
 
Tom,
More question....
Is there any coding that could tell what the last macro that have been
run from other Workbook?

Thanks,

Resant
 
Not Unless you have the macro write that information someplace where you can
access it; there is no built in support for it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top