Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto-run macro after a save-as event

Hi,

I am trying to auto run a macro after I save a workbook. I'm picking u
where someone else is left off so I'm having some trouble following
I'll describe the situation and if you have a better sugguest, pleas
let me know. All help is appreciated!

There is an existing VB project that does a certain action. It wil
write data to an Excel spreadsheet and save it as a .xls. What I wan
to do is do some post-saving actions with a macro that I have alread
written in VBA.

I know that there's a auto_open that automatically open macro's upo
opening of a file. Is there any auto_?? that could detect the savin
of a file and run the macro specified?

Since I already developed the macro in VBA and it uses a lot of cel
references to the Excel spreadsheet, I want to link the VB applicatio
with excel. I want to have a template Excel file whch already contain
the VBA macro, have the VB application write to the template file, sav
the file as something else and run the VBA macro contained.

Or is it better to have the module imported to the excel spreadshee
automatically and run that after the save command in the VB script?

Thank you very very much

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Auto-run macro after a save-as event

Hi
look at the workbook event BeforeSave for this

--
Regards
Frank Kabel
Frankfurt, Germany


Hi,

I am trying to auto run a macro after I save a workbook. I'm picking
up where someone else is left off so I'm having some trouble
following. I'll describe the situation and if you have a better
sugguest, please let me know. All help is appreciated!

There is an existing VB project that does a certain action. It will
write data to an Excel spreadsheet and save it as a .xls. What I want
to do is do some post-saving actions with a macro that I have already
written in VBA.

I know that there's a auto_open that automatically open macro's upon
opening of a file. Is there any auto_?? that could detect the saving
of a file and run the macro specified?

Since I already developed the macro in VBA and it uses a lot of cell
references to the Excel spreadsheet, I want to link the VB

application
with excel. I want to have a template Excel file whch already

contains
the VBA macro, have the VB application write to the template file,
save the file as something else and run the VBA macro contained.

Or is it better to have the module imported to the excel spreadsheet
automatically and run that after the save command in the VB script?

Thank you very very much!


---
Message posted from http://www.ExcelForum.com/


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to auto save file using the format YYMM Dolphinv4 Excel Discussion (Misc queries) 1 September 29th 05 04:09 AM
save as event scrabtree23 Excel Programming 1 October 5th 03 10:14 PM
Macro vs Manual save event David Sedberry Excel Programming 2 September 25th 03 06:05 PM
auto save as macro Kelly[_3_] Excel Programming 0 July 30th 03 04:26 PM
After save event Bart[_3_] Excel Programming 2 July 22nd 03 12:07 PM


All times are GMT +1. The time now is 09:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"