Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
McP McP is offline
external usenet poster
 
Posts: 6
Default Cancel QueryTables.Refresh Process After 10 Seconds

When I .Refresh the following QueryTables.Add statement, the process can run
for several minutes. How do I automatically cancel the Refresh after 10
seconds? Do I use a combination of DoEvents and/or .BackgroundQuery = True?
Excel is locked until the refresh and textfile import have completed.

With ParseSheet.QueryTables.Add(Connection:=ScrapeURL,
Destination:=ParseSheet.Range("A1"))
'.Name = ScrapeURL
..FieldNames = True
..RowNumbers = False
..FillAdjacentFormulas = False
..PreserveFormatting = True
..RefreshOnFileOpen = False
..RefreshStyle = xlOverwriteCells
..SavePassword = False
..SaveData = True
..AdjustColumnWidth = False
..RefreshPeriod = 0
..TextFilePromptOnRefresh = False
..TextFilePlatform = 1252
..TextFileStartRow = 1
..TextFileParseType = xlDelimited
..TextFileTextQualifier = xlTextQualifierDoubleQuote
..TextFileConsecutiveDelimiter = False
..TextFileTabDelimiter = False
..TextFileSemicolonDelimiter = False
..TextFileCommaDelimiter = False
..TextFileSpaceDelimiter = False
..TextFileOtherDelimiter = ":"
..TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1)
..TextFileTrailingMinusNumbers = False
..BackgroundQuery = False
..Refresh
End With

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
Excel Seems to Refresh every 5 seconds lk Excel Discussion (Misc queries) 0 November 13th 06 11:39 PM
How do i refresh external data import in excel in seconds Bala New Users to Excel 2 December 29th 05 05:12 AM
Cancel Macro is user selects 'cancel' at save menu Mark Excel Programming 1 April 6th 05 05:45 PM
How to count process running time ( process not finished) miao jie Excel Programming 0 January 13th 05 09:23 AM
cancel query refresh - vb paddy Excel Programming 0 August 7th 03 02:17 AM


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