Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assigning macros to a user-defined menu item in Excel

Status
Not open for further replies.

tulip123

Programmer
Apr 17, 2001
4
IL
When I assign a macro name to a user-defined menu item in an Excel workbook file, the macro name is assigned with the full path of the Excel workbook file name. The problem is that if I copy the Excel file to another folder and open it, the macro cannot be activated because the location points to another file.
Any way to solve this ?
 

tulip123
:

Put the macro in a module in either your Personal.xls file or in another file located in your XLSTART directory. This directory is usually found at:

C:\Program Files\Microsoft Office\Office\XLSTART
Regards,

LoNeRaVeR
 
If I understand correctly, the Personal.xls file is located on my computer. This means that if I move the Excel file to another directory on my computer, the macro would be found and activated correctly. But what if I copy the Excel file to another computer ?
 

tulip123
:

This wouldn't allow the macro to work. An alternate option is to create an Addin and distribute it to each of the computers that require the code. Regards,

LoNeRaVeR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top