Display macro name

Last Edited By Krjb Donovan
Last Updated: Mar 05, 2014 09:25 PM GMT

Question

Hai How r u?

i have my own add-in for somemacros. i want to add one more thing in my add-in,

is it possible to show running macro name in statusbar. i.e if user clicks on "change case" macro button, while running the macro, status bar will show the message " Running Change Case"

Best Vimal

Answer

vimal,


Followup to your statement in the ratings:

No, there is no ActiveMacro object or anything of that nature. When VBA converts you code to executable instructions, it doesn't use such things as names except during the translation.


You would have to put code to to that in each macro

Say you had a macro named Sub ChangeCase()

Sub ChangeCase() ' diplay name in StatusBar application.StatusBar = "ChangeCase is running" ' current code in ChangeCase

' Restore StatusBar to normal operation Application.StatusBar = False End Sub

Again, you would have to put code like that in every procedure.

Advertisement

©2017 eLuminary LLC. All rights reserved.