Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
been playing with the progressbar form j-walk.com. Some loops cycle through over 4000 items, and the analysis time for this using the progressbar had increased by 10x - which of course is not surprising - but is a very nice indicator that things are actually progressing... Can anyone suggest a modification that will only get the progressbar to update itself as given increments are reached - maybe either at every 20th iteration etc - that way could find a nice compromise between some slowing of analysis and visual aid. Is there a function that would be "true" if the value of 'i' was an exact multiple of 10 etc ??
Many thanks in advance. For i = 1 to 1000 PctDone = i / 1000 With UserForm1 .FrameProgress.Caption = Format(PctDone, "0%") .LabelProgress.Width = PctDone * (.FrameProgress.Width - 10) End With DoEvents Next i |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could do something like this:
For i = 1 To 1000 If i Mod 20 = 0 Then PctDone = i / 1000 With UserForm1 .FrameProgress.Caption = Format(PctDone, "0%") .LabelProgress.Width = PctDone * (.FrameProgress.Width - 10) End With DoEvents End If Next i RBS "Mike Iacovou" wrote in message ... been playing with the progressbar form j-walk.com. Some loops cycle through over 4000 items, and the analysis time for this using the progressbar had increased by 10x - which of course is not surprising - but is a very nice indicator that things are actually progressing... Can anyone suggest a modification that will only get the progressbar to update itself as given increments are reached - maybe either at every 20th iteration etc - that way could find a nice compromise between some slowing of analysis and visual aid. Is there a function that would be "true" if the value of 'i' was an exact multiple of 10 etc ?? Many thanks in advance. For i = 1 to 1000 PctDone = i / 1000 With UserForm1 .FrameProgress.Caption = Format(PctDone, "0%") .LabelProgress.Width = PctDone * (.FrameProgress.Width - 10) End With DoEvents Next i |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If i Mod 10 = 0 Then
' Perform the form update End If I use the Statusbar to display results instead of a Progressbar. HTH Paul -------------------------------------------------------------------------------------------------------------- Be advised to back up your WorkBook before attempting to make changes. -------------------------------------------------------------------------------------------------------------- been playing with the progressbar form j-walk.com. Some loops cycle through over 4000 items, and the analysis time for this using the progressbar had increased by 10x - which of course is not surprising - but is a very nice indicator that things are actually progressing... Can anyone suggest a modification that will only get the progressbar to update itself as given increments are reached - maybe either at every 20th iteration etc - that way could find a nice compromise between some slowing of analysis and visual aid. Is there a function that would be "true" if the value of 'i' was an exact multiple of 10 etc ?? Many thanks in advance. For i = 1 to 1000 PctDone = i / 1000 With UserForm1 .FrameProgress.Caption = Format(PctDone, "0%") .LabelProgress.Width = PctDone * (.FrameProgress.Width - 10) End With DoEvents Next i |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
MOD - thanks. knew there what be - should have remembered to try looking this up from my BBC Micro basic programming days !!!!
I was using statusbar updates, but decided things looked cluttered and hid the excel application... could do similar by dynamically updating a userform label with just text... i'll see the sped trade-off. Thanks for all help ;) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Walk over all the points in a series and extract the X value? | Charts and Charting in Excel | |||
ProgressBar Control | Excel Discussion (Misc queries) | |||
Nelp required to integrate ProgressBar | Excel Discussion (Misc queries) | |||
Walk me through this VBA piece please | Excel Programming | |||
ProgressBar Out of Sync | Excel Programming |