LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Opt Out of a Query.

That second to last line should have actually read:

AnyQueryTablesRefreshing = bln

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Rob van Gelder" wrote in message
news:...
If your query is in fact an Excel QueryTable, then you could check the
Refreshing property of each QueryTable.
To cancel a refreshing QueryTable, run the CancelRefresh method.

Sub AllQueryTablesCancelRefresh()
Dim qtb As QueryTable

For Each qtb In ActiveSheet.QueryTables
If qtb.Refreshing Then qtb.CancelRefresh
Next
End Sub


Function AnyQueryTablesRefreshing() As Boolean
Dim qtb As QueryTable, bln As Boolean

bln = False
For Each qtb In ActiveSheet.QueryTables
If qtb.Refreshing Then
bln = True
Exit For
End If
Next
AnyQueryTablesRefreshing = False
End Function


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Nicholas" wrote in message
...
I have a worksheet with a macro that grabs information from many URL
sources.
The macro looks for information within the query date entries after a
button
selection. What I would like to incorperate is a button to suspend the
macro. Or even better a message box stating the query is being compiled
with possibly a Cancel button.





 
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
Import New Database Query (Union Query) in Spreadsheet klock Excel Discussion (Misc queries) 2 September 24th 09 01:30 AM
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM
Stop to modify the SQL query manually entered into query ! Olivier Rollet Excel Programming 6 November 3rd 04 08:34 AM


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