View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Beertje Beertje is offline
external usenet poster
 
Posts: 10
Default Passing a variable to UserForm_activate() event

Hi Bob,
Project has 10 different macros, each takes about 2 - 5 minutes actual run
time.
I want to use the same progress bar for each macro.
Each macro is activated on one userform with 1 commandbuttons for each macro.
I.e.
Private Sub cmdOverallPerf_Click()
ufOverall.LabelProgress.Width = 0
ufOverall.Show
End Sub

I want to use the UserForm_activate() event as follows:

Private Sub UserForm_activate()
Call macro
End Sub

if i can pass the macroname to this event.

Thanks

AH


"Bob Phillips" wrote:

What exactly are you trying to do, in words?

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Beertje" wrote in message
...
I am trying to use one userform for different macro's.
i.e.:
Private Sub UserForm_activate(macro)
If macro="modA" then
Call modA
Else
if macro ="modB"
Call modB
Else
Call modC
endif
Endif
End Sub

Is this possible? Please adise how to since I cannot get it to work.

Thanks.