I'm trying to update automatically a label located directly in an Excel sheet (not containing a form) via an vba script.
My Excel sheet contain a lot of text and steps to do for the job to do. Each step has it own button and label. That's why I decided to put a label after each button calling its own function.
After clicking the button, the function is executed and the label changes several times during the execution of the script. Nevertheless my label is not updated during the execution. It is updated only at the end (when the execution is completed) with the last value defined.
I tried this lines:
DoEvents
Or
Application.ScreenUpdating = True
But it's not working.
Here my script:
Private Sub ButtonExcelToWord_Click()
Me.Label.Caption = "Exécution du script..."
Application.ScreenUpdating = True
DoEvents
Me.Label.Caption = "Mise à jour..."
Application.ScreenUpdating = True
DoEvents
.......
End Sub
Could yo please tell me how to do that, and if it's possible to do that without doing a form?
Thanks