View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default automatically run startup macro in new workbook

http://www.cpearson.com/excel/appevent.htm

--
Regards,
Tom Ogilvy


"GALJohnson" wrote in message
...
I am opening a new workbook in excel from an access macro. I want to save
the excel file as a tab delimited txt file and then exit Excel. I have
written a procedure that will run on startup of an workbook, do the save
and
then exit. But I need it to run in a new workbook.

So I also set it up to just exit if it is not one particular file name.
I
then put it into personal.xla and saved in XLStart directory. Sounds
logical
except that it appears that it runs when personal.xla opens and has
already
finished when the file that I want it to run in opens.

Anybody got any ideas?

Anne

PS I did some fairly decent access programming about 5 years ago, but it
was one major project and I am finding that I have forgotton most of what
I
knew back then (so try to keep it simple for my aging feeble mind).