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

3 comments:

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

    http://spreadsheetpage.com/index.php/tip/displaying_a_progress_indicator/

    ReplyDelete
  2. or try the link below

    http://www.ozgrid.com/FreeDownloads/DisplayWaitMessage.zip

    ReplyDelete
  3. also visit

    http://www.excelvbamacros.com/2012/08/show-progress-bar-in-excel-while-macro.html

    ReplyDelete

Import data from SQL

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