Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trying to adapt progress meter


Hi I'm using the following code behind a form to activate a form with
prgress meter on it. The form looks and acts the way I want it to no
but I have to adapt it to my code.

Instead of using the RowMax and ColMax variables, I would like to refe
to two cells on my worksheet. One is "Requested" C5 and one i
"Received" C6 once Received - Requested is complete (which might not b
100%) the meter should advance to 100% and then close.

Sub ShowUserForm()
UserForm1.Show
End Sub

Sub TestForm()
Dim Counter As Integer
Dim RowMax As Integer, ColMax As Integer
Dim r As Integer, c As Integer
Dim PctDone As Single

Application.ScreenUpdating = False

Counter = 1
RowMax = 400
ColMax = 55

For r = 1 To RowMax
For c = 1 To ColMax

Range("A1").Value = Int(Rnd * 1000)
Counter = Counter + 1
Next c

PctDone = Counter / (RowMax * ColMax)

UpdateProgressBar PctDone
Next r

Unload frmWait
End Sub

Sub UpdateProgressBar(PctDone As Single)
With frmWait

.FrameProgress.Caption = Format(PctDone, "0%")

.LabelProgress.Width = PctDone * _
(.FrameProgress.Width - 10)
End With

DoEvents
End Sub


Thank

--
hotherp
-----------------------------------------------------------------------
hotherps's Profile: http://www.excelforum.com/member.php...nfo&userid=505
View this thread: http://www.excelforum.com/showthread.php?threadid=26995

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
How do I write a superindex in excel? (e.g. for square meter m2) gleba Excel Discussion (Misc queries) 5 April 4th 23 10:27 AM
progress meter for Calculation? Pausert of Nikkeldepaiin Excel Discussion (Misc queries) 8 December 14th 07 07:14 PM
Meter Readings Maria Tracey New Users to Excel 21 April 21st 06 09:09 PM
Daily water meter readings Jon Berenson Excel Worksheet Functions 1 July 15th 05 11:04 PM
Progress Meter during macro execution Rob[_21_] Excel Programming 7 June 22nd 04 06:36 PM


All times are GMT +1. The time now is 02:01 PM.

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"