Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default j-walk progressbar mod question

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default j-walk progressbar mod question

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default j-walk progressbar mod question

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default j-walk progressbar mod question

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
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
Walk over all the points in a series and extract the X value? Chrisso Charts and Charting in Excel 3 August 28th 09 12:20 PM
ProgressBar Control Ayo Excel Discussion (Misc queries) 3 October 18th 08 07:24 AM
Nelp required to integrate ProgressBar Ola2B Excel Discussion (Misc queries) 0 July 20th 07 03:06 PM
Walk me through this VBA piece please Michael[_27_] Excel Programming 0 May 10th 04 02:11 PM
ProgressBar Out of Sync RDallas Excel Programming 2 January 13th 04 04:25 PM


All times are GMT +1. The time now is 09:36 AM.

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"