Ok slight problem. the code im using for it keeps bringing an error if i try modeless 
Sub Main()
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
' Initialize variables.
Counter = 1
RowMax = 100
ColMax = 25
' Loop through cells.
For r = 1 To RowMax
For c = 1 To ColMax
'Put a random number in a cell
Cells(r, c) = Int(Rnd * 1000)
Counter = Counter + 1
Next c
' Update the percentage completed.
PctDone = Counter / (RowMax * ColMax)
' Call subroutine that updates the progress bar.
UpdateProgressBar PctDone
Next r
' The task is finished, so unload the UserForm.
Unload UserForm1
End Sub
Sub UpdateProgressBar(PctDone As Single)
With UserForm1
' Update the Caption property of the Frame control.
.frameprogress.Caption = Format(PctDone, "0%")
' Widen the Label control.
.labelprogress.Width = PctDone * _
(.frameprogress.Width - 10)
End With
' The DoEvents allows the UserForm to update.
DoEvents
End Sub
Run-time error '50290': Method 'ScreenUpdating' of object '_Application' failed...
I guess I cant have modeless and the progress bar to update like that?
Whats the best way for it
Bookmarks