excel macro

G

Guest

hi,

i've created several macros in ms excel. i have a template i use and then i
run the macros. the first time i run the macros they work fine but the next
time i try to run it again it is trying to access the macro from the first
document created using that template. In other words, if the template is
comparison.xlt and i open a workbook using this template it is labeled
comparison1.xls. After i run the macro and close this document w/o saving the
next time i run the macros it is looking for comparison1.xls otherwise it
wont work. Why is it doing this if i created the macros for all open
workbooks? can anyone help?

Thank you
 
O

Otto Moehrbach

If I understand you correctly, you should put your macros in your
Personal.xls workbook. That workbook is always opened when Excel is opened
and all the macros in it are available for your use on any open workbook.
To find out if you have a Personal.xls workbook, click on Window -
Unhide. If "Unhide" is not available or Personal.xls is not listed, then
you need to create it. Do this to create it:
Click on Tools - Macro - Record New Macro. Click OK when asked to name the
new macro. A small Record Macro toolbar will appear. Click on the small
dark square to close the toolbar. Now click on Window - Unhide and you will
see the Personal.xls workbook. HTH Otto
 
G

Gord Dibben

You will see Personal.xls if you have chosen to store macros in "Personal Macro
Workbook" at step 2 of "Record New Macro"

i.e. When you hit Macro>Record New Macro a dialog box will open with a spot for
the macroname and an option box "store macro in".


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top