There are several situations where we need to know execution status of macro code. we can show status of macro execution in excel status bar. Below block of code will help you to do this.
Sub Status_bar()
' Author: Dreams24
' Written for VBA Tricks and tips blog
' https://vbatricksntips.com
oldStatusBar = Application.DisplayStatusBar
Application.DisplayStatusBar = True
Application.StatusBar = "Please be patient..."
MsgBox "This is example to show information in statusbar !", vbInformation
Application.StatusBar = False
Application.DisplayStatusBar = oldStatusBar
End Sub
Sub Status_bar()
' Author: Dreams24
' Written for VBA Tricks and tips blog
' https://vbatricksntips.com
oldStatusBar = Application.DisplayStatusBar
Application.DisplayStatusBar = True
Application.StatusBar = "Please be patient..."
MsgBox "This is example to show information in statusbar !", vbInformation
Application.StatusBar = False
Application.DisplayStatusBar = oldStatusBar
End Sub
No comments:
Post a Comment