Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I write a superindex in excel? (e.g. for square meter m2) | Excel Discussion (Misc queries) | |||
progress meter for Calculation? | Excel Discussion (Misc queries) | |||
Meter Readings | New Users to Excel | |||
Daily water meter readings | Excel Worksheet Functions | |||
Progress Meter during macro execution | Excel Programming |