Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Auto Open macro not performing as expected

I don't speak queries, but can't you set the .BackgroundQuery = False and have
excel wait for it to be refreshed?



JonR wrote:

Hi

I hav e aspreadsheet that I would like to update every time it is opened. It runs multiple queries to an external database, which fill in the current data. Afterward, I have one cell which the update MS Query function deletes the content and I have to type the name ("unassigned") manually to keep the graphs from having a blank in the legend. Unfortunately, the word "Unassigned" is placed into the appropriate cell before the data is updated, and is subsequently erased during the update process. Is there a way I can adjust the timing of these events, or add a second subroutine to perform the correct actions in sequence? Code below.
TIA

Sub Auto_Open()
'
' Refresh Macro
' Macro recorded 7/21/2004 by JonR
'

'
ActiveWorkbook.RefreshAll
Sheets("SR List Detail DATA & CHARTS").Select
Range("E5").Select
ActiveCell.FormulaR1C1 = "Unassigned"

End Sub


--

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
How to code VBA: Auto open workbook and run macro March Excel Discussion (Misc queries) 4 November 8th 07 08:25 PM
Auto Open Macro Launchnet Excel Worksheet Functions 7 July 20th 07 07:41 PM
Using Container in Auto open macro [email protected] Excel Discussion (Misc queries) 0 November 9th 06 11:22 AM
Auto Fill - working as expected? LynnS New Users to Excel 1 October 17th 06 08:20 PM
How to auto activate macro when file open ? bonzio Excel Worksheet Functions 1 December 16th 05 02:45 PM


All times are GMT +1. The time now is 06:58 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"