Thursday, March 24, 2011

Show Status or Display any message while macro is running

HI all

if you want to display a message while macro is running in a workbook to the user. Check the snapshot below -

and you want to display the message like below

Here is the code:-

Sub displaymss()
Application.ScreenUpdating = False

Application.DisplayStatusBar = True

Application.StatusBar = "Please wait while performing task"

'-------------add your code here-----------------------

Application.StatusBar = False
Application.ScreenUpdating = True
End Sub


  1. try the below link if you want to show a progress bar while macro is running.

  2. or try the link below

  3. also visit


Import data from SQL

Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...