![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 08:50 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com