View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
AKphidelt AKphidelt is offline
external usenet poster
 
Posts: 461
Default Auto Execute Macro

I don't think you can do this with just a macro cause you have to have
something that triggers the event.

In the Visual Basic Editor when you enter a new module, you can select for
"Workbook" and then on the right drop down box you will see a list of
events... like On Open and such.

There you can add some code that gets triggered when the file is open.

"dennis" wrote:

I'm looking to create a macro ( preferably using the macro recorder rather
than by VB code) that will refresh my database query upon opening the
worksheet.

Is this possible or just a pipe dream. I'm not adept at VB coding so that's
why the preference for the macro recorder.

Thanks in advance for any help, hints, or clues.

dennisd