TOM R
Well-known Member
- Joined
- Oct 7, 2006
- Messages
- 731
Hello Members, The code below I'm trying to get to work errors.
with a Compile error: EndWith without With. What would be a remedy for this. Thanks in advance.
Regards, Tom
with a Compile error: EndWith without With. What would be a remedy for this. Thanks in advance.
Code:
Sub UpdateProgress(Pct)
Dim c As Long
UserForm5.LabelProgress.Width = 0
a = 40000
For B = 1 To a
c = B * a
UserForm5.LabelProgress.Width = (B / a) * 400
' Update the Caption property of the Frame control.
UserForm5.FrameProgress.Caption = Format(PctDone, "0%")
' Widen the Label control.
UserForm5.LabelProgress.Width = PctDone * (UserForm5.FrameProgress.Width - 10)
DoEvents
Next B
Unload UserForm5
End With
End Sub
Regards, Tom