Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel97: Show UserForm while running code?

We still use Excel 97 at my place of work (don't ask).

I'd like to display a "Please wait while processing..." message (a UserForm
with an animated GIF) while the VBA is running and processing. Is this
possible to do? Whenever I do Form.show, the VBA code stops until I close
the UserForm. I really don't want to move all the code into the Form if
possible.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default Excel97: Show UserForm while running code?

Hi

Demo: Put in a standard module:

Sub StartCode()
UserForm1.Show
End Sub

Sub MainCode(Optional B As Boolean)
Dim L As Long
For L = 1 To 5000
UserForm1.Caption = L & " of 5000"
UserForm1.Repaint
Cells(L, 1).Select
Cells(L, 1).Value = L
Next
Unload UserForm1
End Sub

And in the userform module:

Private Sub UserForm_Activate()
Me.Repaint
DoEvents
Call MainCode
End Sub

Animated Gif ? Not possible, sorry.

HTH. Best wishes Harald

"Kozo Morimoto" skrev i melding
...
We still use Excel 97 at my place of work (don't ask).

I'd like to display a "Please wait while processing..." message (a
UserForm
with an animated GIF) while the VBA is running and processing. Is this
possible to do? Whenever I do Form.show, the VBA code stops until I close
the UserForm. I really don't want to move all the code into the Form if
possible.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Excel97: Show UserForm while running code?

Kozo Morimoto wrote:
We still use Excel 97 at my place of work (don't ask).

I'd like to display a "Please wait while processing..." message (a UserForm
with an animated GIF) while the VBA is running and processing. Is this
possible to do? Whenever I do Form.show, the VBA code stops until I close
the UserForm. I really don't want to move all the code into the Form if
possible.


There is a hack:

http://xcelfiles.homestead.com/Excel01.html#anchor_22
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Excel97: Show UserForm while running code?

You need to start the userform, then run your c ode, or initiate it, from
within the form. Then when it ends, close the form down.

--
HTH

Bob Phillips

"Kozo Morimoto" wrote in message
...
We still use Excel 97 at my place of work (don't ask).

I'd like to display a "Please wait while processing..." message (a

UserForm
with an animated GIF) while the VBA is running and processing. Is this
possible to do? Whenever I do Form.show, the VBA code stops until I close
the UserForm. I really don't want to move all the code into the Form if
possible.




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
Re-show userform after closing file - code help Gerry O Excel Discussion (Misc queries) 3 September 4th 07 10:52 PM
Problem running code behind a userform cdb Excel Programming 17 February 10th 05 03:53 PM
ActiveX CommandButton gets renamed when Sheet is cloned running Excel97 JimP Excel Programming 1 December 28th 04 02:32 PM
Excel97 Userform to be system modal/equivalent George J Excel Programming 2 September 26th 04 11:05 PM
Userform in excel97 not working right! Simon Lloyd[_485_] Excel Programming 3 June 15th 04 03:53 PM


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