ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto open macros in Excel (https://www.excelbanter.com/excel-programming/292101-auto-open-macros-excel.html)

Tammy[_4_]

Auto open macros in Excel
 
I'm trying to create an auto_open macro which saves the workbook being
opened into a certain directory if it hasn't already been saved. I
placed the code in the Workbook_open event in book.xlt and this works
on Workbooks created after I added the code but doesn't run on any
workbooks created before.

I've tried adding the auto_open code in an addin but this only seems
to run when Excel starts up (and the addin opened I guess).

I'm new to Excel programming (experienced in Word programming but
that's it). I've searched the groups and found a lot on auto_open
macros but can't get any to work ... Any help greatly appreciated!!

Cheers,
Tammy

Tom Ogilvy

Auto open macros in Excel
 
Once a workbook is created from a template, it has no more connection to
that template, so any changes you make to the xlt file will not be reflected
in any previously created workbook. There is no accessible attribute in a
workbook that will tell you it was created from a specific template file.

--
Regards,
Tom Ogilvy

"Tammy" wrote in message
om...
I'm trying to create an auto_open macro which saves the workbook being
opened into a certain directory if it hasn't already been saved. I
placed the code in the Workbook_open event in book.xlt and this works
on Workbooks created after I added the code but doesn't run on any
workbooks created before.

I've tried adding the auto_open code in an addin but this only seems
to run when Excel starts up (and the addin opened I guess).

I'm new to Excel programming (experienced in Word programming but
that's it). I've searched the groups and found a lot on auto_open
macros but can't get any to work ... Any help greatly appreciated!!

Cheers,
Tammy





All times are GMT +1. The time now is 10:41 PM.

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