Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Showing a progress message

I am writing a code in which I am updating several files from a main data
sheet. I just want to show a progress message which would display the file
name being processed. I tried to use the "Msgbox " statement but it would
stop to code while being displayed, where I want the message to stay on while
the code being executed.

Any help to this will be much appreciated.

--
Thanx & regards,
Asif
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Showing a progress message

This is a very simple way to show a progress in the statusbar:

Sub StatusProgressBar(lCounter As Long, _
lMax As Long, _
lInterval As Long, _
Optional strText As String)

Dim lStripes As Long

If lCounter Mod lInterval = 0 Or lCounter = lMax Then
lStripes = Round((lCounter / lMax) * 100, 0)
Application.StatusBar = strText & _
String(lStripes, "|") & _
String(100 - lStripes, ".") & "|"
End If

End Sub


RBS


"Asif" wrote in message
...
I am writing a code in which I am updating several files from a main data
sheet. I just want to show a progress message which would display the file
name being processed. I tried to use the "Msgbox " statement but it would
stop to code while being displayed, where I want the message to stay on
while
the code being executed.

Any help to this will be much appreciated.

--
Thanx & regards,
Asif


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Showing a progress message

One of the simpler ways would be to make use of statusbar.

E.g.

Sub StatusBar_demo()
Dim i As Long
For i = 1 To 1000
Cells(i, 1).Value = i 'put
Application.StatusBar = "Your Text Here (" & i & " of 1,00)"
Next i

Application.StatusBar = False 'reset the status bar
End Sub



On Jul 22, 6:11*pm, Asif wrote:
I am writing a code in which I am updating several files from a main data
sheet. I just want to show a progress message which would display the file
name being processed. I tried to use the "Msgbox " statement but it would
stop to code while being displayed, where I want the message to stay on while
the code being executed.

Any help to this will be much appreciated.

--
Thanx & regards,
Asif


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
configuration progress message Yas Excel Discussion (Misc queries) 2 February 10th 08 06:31 PM
How do I set up a sheet showing tasks, progress, outcome, etc? Donna Excel Discussion (Misc queries) 1 June 26th 06 05:00 PM
how to create a msgbox showing progress of macro Macropod Excel Programming 1 December 16th 05 01:26 AM
progress message in status bar Eric Excel Programming 1 July 27th 04 05:07 PM
progress message GUS Excel Programming 1 September 12th 03 04:27 PM


All times are GMT +1. The time now is 02:54 AM.

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"