Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Nelp required to integrate ProgressBar

I seem to be struggling with how to integrate the progress bar vb
codes with the main program events. Currently, the main program is
executed through a userform that requests for a password to start (the
userform is programmed to call the main event).

Then the problem i'm having is where to position or attach the
progress bar codes to: below is an example i'm trying to follow: And
obviously it needs to call a program? Please note, I have set up the
bar indicator in userform1.


Sub Main()
' Inserts random numbers on the active worksheet
Dim Counter As Integer
Dim RowMax As Integer, ColMax As Integer
Dim r As Integer, c As Integer
Dim PctDone As Single


If TypeName(ActiveSheet) < "Worksheet" Then Exit Sub
Cells.Clear
Application.ScreenUpdating = False
Counter = 1
RowMax = 100
ColMax = 25
For r = 1 To RowMax
For c = 1 To ColMax
Cells(r, c) = Int(Rnd * 1000)
Counter = Counter + 1
Next c
PctDone = Counter / (RowMax * ColMax)
With UserForm1
.FrameProgress.Caption = Format(PctDone, "0%")
.LabelProgress.Width = PctDone * (.FrameProgress.Width -
10)
End With
' The DoEvents statement is responsible for the form updating
DoEvents
Next r
Unload UserForm1
End Sub


Thanks.

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 integrate MapPoint into Excel? 4ldoherty Excel Discussion (Misc queries) 2 June 16th 06 08:58 PM
how can I integrate in Excel? Jannik Excel Discussion (Misc queries) 4 March 2nd 06 07:39 PM
How Do I Integrate? Myles Excel Discussion (Misc queries) 2 January 18th 06 03:09 PM
integrate Peter Charts and Charting in Excel 1 December 3rd 05 03:14 AM
How to integrate cells from different .xls into one consolidation fgauvin Excel Discussion (Misc queries) 1 April 10th 05 04:17 PM


All times are GMT +1. The time now is 03:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"