Run an Excel Macro From a Cell Reference

Last week I wrote an article about hiding Excel macros, so they don’t appear in the macro list. While working on that article I noticed that the Macro dialog box has a Collapse Dialog button.


While the Macro name box is active, you can go to the workbook, select a sheet, and click on a cell.


MacroCollapse


I couldn’t figure out why that button was there. Even if I typed a macro name in a cell, then clicked on that cell, that macro didn’t run.


Refer to Macro Sheets


Dave Peterson suggested that the Collapse Dialog button might be related to Excel’s old style XLM macros. And he was right – I finally found the confirmation in my old Excel 3.0 manual. It says “You can also enter in the Reference box the reference of the first cell of the command macro you want to run.”


The old style macros were written on Macro sheets.


InsertMacroSheet


From the Macro dialog box, you could click on the starting cell of a macro, then click the Run button.


MacroXLMRun


I guess the button is still there for compatibility with those old macros, and maybe it will eventually disappear from the Macro dialog box.


___________________

You may also like...

1 Response

  1. L. Quezada says:

    I think it will be there forever. Just like DATEDIF.

Leave a Reply to L. Quezada Cancel reply

Your email address will not be published. Required fields are marked *