MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Macro assigned for an Icon problem


Posted by Eli Weiss on November 21, 2001 5:34 AM

I have made a customized ICON on the toolbar and assigned a simple macro to it:

ActiveCell.FormulaR1C1 = "=TODAY()"

This macro puts DATE into the current cell whenever I press the ICON

The problem is that I must keep available the original workbook that had the macro
How can I assign the macro to the ICON so that it would not need to open the original workbook?

I hope that I made myself clear
Eli



Posted by Dank on November 21, 2001 6:26 AM

Put the macro in your personal macro workbook. To see if you have one click Window, Unhide. If you can't unhide then you don't have a personal macro workbook. To create one, click Tools, Macros, Record New Macro and then choose Personal Macro Workbook on the Store Macro In combo box. Record some sort of macro and then click stop. Now if you go into the VB editor you will be able to edit code in the PMW.

The file Personal.xls is stored somewhere in your hard drive in the folder XLSTART. Any files stored in this folder will open automatically when Excel opens.

Hope this helps,
Daniel.

Posted by Eli Weiss on November 21, 2001 12:35 PM

Re: Thank you

Thank you Dank
It works
Eli