Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Code stops while Userform Shown

I have some code which shows a userform. While the form is shown I want to
run through a lenthy routine and periodocially update a label with status
strings. However, once the userform is shown, the code stops progressing. I
can only get the code to progress if I close the form. It almost as if I
have set break in the code on the first line after the Userform1.Show
statement. Any ideas?


Sub DoSomething()
Userform1.Show

Call DoSomethingElse

End Sub

Call DoSomethingElse
Userform1.Label1 = "Show something"
End Sub

Thanks

EM
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Code stops while Userform Shown

Duh. Needed to ste ShowModal = False to make modeless.

Thanks

EM

"ExcelMonkey" wrote:

I have some code which shows a userform. While the form is shown I want to
run through a lenthy routine and periodocially update a label with status
strings. However, once the userform is shown, the code stops progressing. I
can only get the code to progress if I close the form. It almost as if I
have set break in the code on the first line after the Userform1.Show
statement. Any ideas?


Sub DoSomething()
Userform1.Show

Call DoSomethingElse

End Sub

Call DoSomethingElse
Userform1.Label1 = "Show something"
End Sub

Thanks

EM

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Code stops while Userform Shown

The way to do that and make your code self-documenting is to use the
built-in VB constant...

Userform1.Show vbModeless

--
Rick (MVP - Excel)


"ExcelMonkey" wrote in message
...
Duh. Needed to ste ShowModal = False to make modeless.

Thanks

EM

"ExcelMonkey" wrote:

I have some code which shows a userform. While the form is shown I want
to
run through a lenthy routine and periodocially update a label with status
strings. However, once the userform is shown, the code stops
progressing. I
can only get the code to progress if I close the form. It almost as if I
have set break in the code on the first line after the Userform1.Show
statement. Any ideas?


Sub DoSomething()
Userform1.Show

Call DoSomethingElse

End Sub

Call DoSomethingElse
Userform1.Label1 = "Show something"
End Sub

Thanks

EM


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
Userform moves when hidden and shown again. Dale Fye Excel Programming 6 October 24th 07 01:53 PM
UserForm initialize event run when UserForm is shown [email protected] Excel Programming 2 June 13th 07 02:49 AM
Using Cells while UserForm shown T_o_n_y Excel Programming 8 February 3rd 07 09:39 PM
Userform shown in windows other than Excel abcsms Excel Programming 2 March 29th 06 03:10 AM
Userform to enter values and shown in same userform in list helmekki[_104_] Excel Programming 0 November 19th 05 03:23 PM


All times are GMT +1. The time now is 01:02 PM.

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

About Us

"It's about Microsoft Excel"