Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Passing a variable to UserForm_activate() event

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Passing a variable to UserForm_activate() event

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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
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.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Passing a variable to UserForm_activate() event

I still do not see why you want to pass the macro name anywhere.

If you have 10 macros, you would call the progress bar update routine from
each of those macros, with a different progress tick and display the
progress again.

Is the Userform whose activate event that you show, different from the
ufOverall form.I find it easiest to load the progress form , and then call
the macros from within there.

--
---
HTH

Bob

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



"Beertje" wrote in message
...
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.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
must I travel through UserForm_activate event? Dave B[_9_] Excel Programming 1 December 21st 05 01:43 AM
Passing variable to VarType of other Variable ExcelMonkey[_190_] Excel Programming 3 February 22nd 05 01:38 PM
Passing CheckBox Value from Click Event to Main Macro ExcelMonkey[_190_] Excel Programming 2 February 1st 05 05:47 PM
UserForm_Activate not found [email protected] Excel Programming 1 October 8th 04 03:49 AM
Passing ARGUMENTS between event procedures of a USERFORM jason Excel Programming 8 November 10th 03 07:36 PM


All times are GMT +1. The time now is 01:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"