Timbo
01-03-2007, 08:43 AM
Hi,
I am running some code which takes sometime to complete, and I wish to display a message to the user in the form of a changing caption in a label on a userform. I only have one form open, but using DoEvents in the way I have used it, does not cause the caption to change. Basically, a series of proceedures run, and at the end of each one, I have used DoEvents to update the caption. Where have I gone wrong? Here is an example of the code:-
myform = DoEvents
If myform = 1 Then
Application.ScreenUpdating = True
With frmSelectFile
.lblprocessActual.ForeColor = vbBlack
.lblprocessActual.Caption = "Done"
.lblProcessFiled.ForeColor = vbRed
.lblProcessFiled.Caption = ">> Processing FILED data..."
End With
Application.ScreenUpdating = False
End If
many thanks if you can help
Tim
:banghead:
I am running some code which takes sometime to complete, and I wish to display a message to the user in the form of a changing caption in a label on a userform. I only have one form open, but using DoEvents in the way I have used it, does not cause the caption to change. Basically, a series of proceedures run, and at the end of each one, I have used DoEvents to update the caption. Where have I gone wrong? Here is an example of the code:-
myform = DoEvents
If myform = 1 Then
Application.ScreenUpdating = True
With frmSelectFile
.lblprocessActual.ForeColor = vbBlack
.lblprocessActual.Caption = "Done"
.lblProcessFiled.ForeColor = vbRed
.lblProcessFiled.Caption = ">> Processing FILED data..."
End With
Application.ScreenUpdating = False
End If
many thanks if you can help
Tim
:banghead: