Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Stop Refreshing via VBA

I have several web queries that auto-refresh every X minutes or so. I would
like to craft a macro that temporarily suspends refreshing so, for example, I
can edit the spreadsheet without interruption. And, of course, I'd need a way
to un-suspend. I didn't know if this was possible short of manually changing
the refresh parameter in each query.

Any ideas appreciated.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default Stop Refreshing via VBA

If it's a QueryTable, there are a few things you can do
programmatically.

Set RefreshPeriod Property to zero (temporarily)
Set the Refresh Property BackgroundQuery parameter to False.

HTH,
JP

On Sep 23, 5:11*pm, John V wrote:
I have several web queries that auto-refresh every X minutes or so. I would
like to craft a macro that temporarily suspends refreshing so, for example, I
can edit the spreadsheet without interruption. And, of course, I'd need a way
to un-suspend. I didn't know if this was possible short of manually changing
the refresh parameter in each query.

Any ideas appreciated.


  #4   Report Post  
Posted to microsoft.public.excel.programming
ken ken is offline
external usenet poster
 
Posts: 21
Default Stop Refreshing via VBA

G'day there John V,

I've never needed to interrupt auto-refresh myself, but your question
raised my interest so I had a quick browse of XL's Help pages.

There are several methods & properties to control the auto-refresh
including CancelRefresh; RefreshAll; EnableRefresh; and probably of more
use is the RefreshPeriod property.

I'm sure you could construct somethnig to turn it on & off especially
with the latter. Help gives as a description:

------
Setting the period to 0 (zero) disables automatic timed refreshes and
is equivalent to setting this property to Null.

The value of the RefreshPeriod property can be an integer from 0 through 32767.
-----

I think that may be worth looking at.

See ya
Ken McLennan
Qld Australia

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
Stop Refreshing/Blinking Chart screen when running Mouse over even Edgar[_2_] Excel Programming 0 May 21st 09 03:24 PM
Stop automatic data reformat when refreshing a query RobC Excel Discussion (Misc queries) 0 July 23rd 08 05:14 PM
How do I stop the SQL Login screen when refreshing a query. Elbmag Excel Programming 3 July 2nd 06 04:41 AM
How can I stop charts from refreshing when changing source data? Jens Rauff Charts and Charting in Excel 0 June 22nd 06 08:30 AM
How do I stop other circles in other boxes to stop selecting? stauff Excel Worksheet Functions 1 October 28th 04 10:27 PM


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