Showing posts with label Show Status or Display any message while macro is running. Show all posts
Showing posts with label Show Status or Display any message while macro is running. Show all posts

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

Import data from SQL

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