LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default must I travel through UserForm_activate event?

I've made a progress bar using John Walkenbach's template. I don't
show the progress bar right away, so my code looks like this:

Sub MySub()
'some code
frmProgressBar.Show
'more code
End Sub

When I show the userform, it gets stuck in the UserForm_activate event.

My question is, can I return to the "more code" section above, or do I
have to break my code up like this:

Sub MySub1()
'some code
frmProgressBar.Show
End Sub

Sub UserForm_activate() '(in code module for UserForm)
Call MySub2
End Sub

Sub MySub2()
'more code
End Sub

Do I have to break up my main procedure like this? Seems pretty
tedious, and I'm not a fan of breaking my main code into two sub
procedures, but I'll do it if I have to.

Thanks in advance for your help.

As a follow-up, under this structure when I "Unload frmProgressBar"
from within MySub2, will the code progress back through the "End Sub"
of MySub1 as it ends? (Just curious.)

 
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
Travel Expense report Excel ??[_2_] Excel Discussion (Misc queries) 0 December 14th 07 04:16 AM
Time it took to travel Steved Excel Worksheet Functions 2 November 13th 07 10:01 PM
Travel time problem Paul Excel Worksheet Functions 2 December 2nd 06 12:58 PM
travel expenses by month silky_green Excel Discussion (Misc queries) 1 August 23rd 06 04:09 PM
UserForm_Activate not found [email protected] Excel Programming 1 October 8th 04 03:49 AM


All times are GMT +1. The time now is 09:30 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"