Delay between Application.ScreenUpdatind = True/False to show the change

Wednesday, July 9, 2014

I have this problem: My code runs in Application.ScreenUpdating = False but at some moments, I need to show the "progress message" to the user.


I have this code:



Sub CommentUpdate(TextBoxName As Object, CommentMessage As String)
Application.ScreenUpdating = True
TextBoxName.Text = CommentMessage
Application.ScreenUpdating = False
End Sub


But when it's running inside my whole program, it doesn't work. If I do it step by step in the VBA Editor (via F8), it works and I see the change.


I suspect that in the general code, this instruction (the switch between True/False) is too fast and the screen has no time to update.


Could be adding of, let say, 1 second waiting time to the procedre of any help?







http://ift.tt/1rReulp