Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Pause Code Execution

I have a workbook with an ON-OPEN VB sub that runs which refreshes a web
query, then saves, then closes. The code is below:
Range("B2").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
DoEvents
ActiveWorkbook.Save

Application.DisplayAlerts = True
Application.Quit

I am not having problems with the workbook, but some of my users in other
locations with similar workbook are having problems (workbook opens and
saves, but seems to do so before the web query refreshes. Is there anything
else other than DoEvents that can be used to pause code execution?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Pause Code Execution

Application.Quit ?
Is your workbook the only thing your users use Excel for ?

Best wishes Harald

"Luke Bailey" skrev i melding
...
I have a workbook with an ON-OPEN VB sub that runs which refreshes a web
query, then saves, then closes. The code is below:
Range("B2").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
DoEvents
ActiveWorkbook.Save

Application.DisplayAlerts = True
Application.Quit

I am not having problems with the workbook, but some of my users in other
locations with similar workbook are having problems (workbook opens and
saves, but seems to do so before the web query refreshes. Is there

anything
else other than DoEvents that can be used to pause code execution?



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
Help - VBA Code execution in Excel Luis[_2_] New Users to Excel 2 September 10th 07 03:14 AM
Pause code in vb Greg[_27_] Excel Programming 4 May 9th 06 10:36 PM
Pause code, wait for input, no input received, carry on with the code [email protected] Excel Programming 1 September 29th 05 12:19 PM
Pause code for data return Candyman Excel Programming 2 January 22nd 05 01:02 AM
Pause in execution Tom Ogilvy Excel Programming 0 September 4th 03 05:33 PM


All times are GMT +1. The time now is 08:21 PM.

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

About Us

"It's about Microsoft Excel"