change
Private Sub CommandButton2_Click()
DemoProgress1
End Sub
To
Private Sub Userform_Activate()
DemoProgress1
End Sub
--
Regards,
Tom Ogilvy
"ceemo" wrote in
message ...
Private Sub UserForm_Initialize()
' ProgressBar1
labPg1.Tag = labPg1.Width
labPg1.Width = 0
labPg1v.Caption = ""
labPg1va.Caption = ""
End Sub
Private Sub CommandButton2_Click()
DemoProgress1
End Sub
Sub DemoProgress1()
'
' Progress Bar
'
Dim intIndex As Integer
Dim sngPercent As Single
Dim intMax As Integer
Application.Cursor = xlWait
intMax = 25
For intIndex = 1 To intMax
sngPercent = intIndex / intMax
ProgressStyle1 sngPercent, True
DoEvents
'------------------------
' Your code would go here
'------------------------
Sleep 100
Next
Application.Cursor = xlDefault
Unload Me
End Sub
--
ceemo
------------------------------------------------------------------------
ceemo's Profile:
http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=482433