Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default msgbox as a progress indicator...

In other posts I have seen that the status bar has been suggested as the
prefered way to show macro progress...

The VBA that I am running swiches between several workbooks and with Screen
updating turned off, the WB that is open when the macro starts... is not the
one that has focus(in the background) where the status bar would display (if
it even would show changes with screen updating off).

what would be a good way to have the current section being executed always
show?

I'd like to have a msgbox popup for this, but I dont want the "OK" button to
sit there a wait for a press. Is there some way to define a seperate box or
form that can display the status message?

Will I have to toggle screen updating on to show it, then toggle it back off?
and, I assume that I would have to swap the active workbook.worksheet to
make sure it has the focus.

suggestions?
--
Regards,
John
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default msgbox as a progress indicator...

Why not use the standard userform progress indicator, such as at
http://www.enhanceddatasystems.com/E...rogressBar.htm


--

HTH

RP
(remove nothere from the email address if mailing direct)


"John Keith" wrote in message
...
In other posts I have seen that the status bar has been suggested as the
prefered way to show macro progress...

The VBA that I am running swiches between several workbooks and with

Screen
updating turned off, the WB that is open when the macro starts... is not

the
one that has focus(in the background) where the status bar would display

(if
it even would show changes with screen updating off).

what would be a good way to have the current section being executed always
show?

I'd like to have a msgbox popup for this, but I dont want the "OK" button

to
sit there a wait for a press. Is there some way to define a seperate box

or
form that can display the status message?

Will I have to toggle screen updating on to show it, then toggle it back

off?
and, I assume that I would have to swap the active workbook.worksheet to
make sure it has the focus.

suggestions?
--
Regards,
John



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default msgbox as a progress indicator...

The statusbar is in the application window. It will be visible and active
even with screenupdating turned off.

To demonstrate, open 5 or six workbooks and run this macro:

Option Explicit
Sub ShowStatus()
Dim bk As Workbook
Dim i As Long
Dim r As Long

Application.ScreenUpdating = False
For i = 1 To 10000000
If i Mod 1000000 = 0 Then
r = Int(Rnd * Workbooks.Count + 1)
If Workbooks(r).Windows(1).Visible Then _
Workbooks(r).Activate
Application.StatusBar = ActiveWorkbook.Name & _
" " & i
DoEvents
End If
Next
Application.ScreenUpdating = True
Application.StatusBar = False

End Sub

--
Regards,
Tom Ogilvy

"John Keith" wrote in message
...
In other posts I have seen that the status bar has been suggested as the
prefered way to show macro progress...

The VBA that I am running swiches between several workbooks and with

Screen
updating turned off, the WB that is open when the macro starts... is not

the
one that has focus(in the background) where the status bar would display

(if
it even would show changes with screen updating off).

what would be a good way to have the current section being executed always
show?

I'd like to have a msgbox popup for this, but I dont want the "OK" button

to
sit there a wait for a press. Is there some way to define a seperate box

or
form that can display the status message?

Will I have to toggle screen updating on to show it, then toggle it back

off?
and, I assume that I would have to swap the active workbook.worksheet to
make sure it has the focus.

suggestions?
--
Regards,
John



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
MS Progress Indicator Mimicked. Thank you. JK Excel Programming 0 August 22nd 04 10:26 PM
Mimick MS Progress Indicator? JK Excel Programming 7 August 22nd 04 07:57 PM
UserForm as Progress Indicator MWE Excel Programming 6 January 19th 04 03:22 PM
PROGRESS INDICATOR jason Excel Programming 6 October 3rd 03 01:58 AM
Popup Progress Indicator David W[_3_] Excel Programming 1 August 18th 03 08:29 PM


All times are GMT +1. The time now is 11:30 PM.

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"