![]() |
Excel Progress Bar problem
Hi All friends! How can i display progress bar when some macro of Excel file is running. How can i indicate user that which record is being processed out of total. Is there possible that i can use same userform(progressbarForm) to display progress bar for different different macros? Thanx Ravi Patel *** Sent via Developersdex http://www.developersdex.com *** |
Excel Progress Bar problem
Ravi,
You should consider whether a dynamic message in the StatusBar would suffice. It is easier to accomplish and requires less overhead... '-- For i = 1 To lngTotal Application.StatusBar = "Working " & Format$(i / lngTotal, "00%") 'some code Next 'Don't forget this... Application.StatusBar = False -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "go4ravi" <meet wrote in message Hi All friends! How can i display progress bar when some macro of Excel file is running. How can i indicate user that which record is being processed out of total. Is there possible that i can use same userform(progressbarForm) to display progress bar for different different macros? Thanx Ravi Patel *** Sent via Developersdex http://www.developersdex.com *** |
Excel Progress Bar problem
Or you could use this function, which will put a simple
progressbar in the statusbar. Function MakeProgressString(lCounter As Long, _ lMax As Long, _ lInterval As Long, _ Optional lWidth As Long = 100, _ Optional strText As String) As String Dim lStripes As Long If lWidth = 0 Then lWidth = 100 End If If lCounter Mod lInterval = 0 Or lCounter = lMax Then lStripes = Round((lCounter / lMax) * lWidth, 0) MakeProgressString = strText & _ String(lStripes, "|") & _ String(lWidth - lStripes, ".") & "|" End If End Function RBS "Jim Cone" wrote in message ... Ravi, You should consider whether a dynamic message in the StatusBar would suffice. It is easier to accomplish and requires less overhead... '-- For i = 1 To lngTotal Application.StatusBar = "Working " & Format$(i / lngTotal, "00%") 'some code Next 'Don't forget this... Application.StatusBar = False -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "go4ravi" <meet wrote in message Hi All friends! How can i display progress bar when some macro of Excel file is running. How can i indicate user that which record is being processed out of total. Is there possible that i can use same userform(progressbarForm) to display progress bar for different different macros? Thanx Ravi Patel *** Sent via Developersdex http://www.developersdex.com *** |
All times are GMT +1. The time now is 06:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com