ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   excel macro (https://www.excelbanter.com/excel-discussion-misc-queries/85929-excel-macro.html)

chartasap

excel macro
 
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

Otto Moehrbach

excel macro
 
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
"chartasap" wrote in message
...
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




Gord Dibben

excel macro
 


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 MacroRecord 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

On Sat, 29 Apr 2006 14:26:26 -0400, "Otto Moehrbach"
wrote:

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
"chartasap" wrote in message
...
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





All times are GMT +1. The time now is 03:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com