Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
external usenet poster
 
Posts: 17
Default Auto Execute Macro

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


  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
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



  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,560
Default Auto Execute Macro

Hi,

What or maybe where is the database that you are querying? Take a look at
Data/Import External Data/, then it will depend on your source for a refresh.
I think you can use the recorder to initial and do a refresh and then have it
available. All of my queries are web based at this point, so that is all I
can test.

David

"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



  #4   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
external usenet poster
 
Posts: 35,218
Default Auto Execute Macro

Record a macro when you do it manually.

Call this macro (or rename it) Auto_Open

Each time you open this workbook (and allow macros to run), the Auto_Open macro
will fire.

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


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
external usenet poster
 
Posts: 17
Default Auto Execute Macro

Thanks, that did the job!

dennisd


"Dave Peterson" wrote in message
...
Record a macro when you do it manually.

Call this macro (or rename it) Auto_Open

Each time you open this workbook (and allow macros to run), the Auto_Open
macro
will fire.

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


--

Dave Peterson



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
Auto Execute Macro dennis[_2_] Excel Discussion (Misc queries) 4 January 17th 09 04:47 PM
Auto Execute Macro dennis[_2_] Excel Worksheet Functions 4 January 17th 09 04:47 PM
Auto-execute macro.... Eric @ SEASH, Evansville Excel Discussion (Misc queries) 1 August 24th 05 09:32 PM
Auto execute a macro if a cell value=1 ? Sven[_6_] Excel Programming 1 November 16th 04 07:25 AM
Auto execute a macro if a cell value=1 ? Sven[_5_] Excel Programming 1 November 15th 04 02:33 PM


All times are GMT +1. The time now is 03:01 AM.

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"