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
Default Refresh object problem


Dear master

I am created a function to download the data from serveral website, th
function is running well if i am using the debug mode to run it line b
line, but once i using the marco to the full set, the program seem kee
loop within the refresh condition, seem refresh = 1 can no
return to me, i may guess that because i am keep looping until th
refresh = 1 return to system, can you help me to solve it, many thanks
:)

Sub GetWebData(strSheet, strURL, strWebTables)

Dim iRefresh As Integer
Dim cRows As Long
Dim i As Long

iRefresh = 0

cRows = Worksheets(strSheet).Cells(Rows.Count, "A").End(xlUp).Row

Set shFirstQtr = Worksheets(strSheet)

Set qtQtrResults = shFirstQtr.QueryTables _
.Add(Connection:="URL;" & strURL & "", _
Destination:=shFirstQtr.Cells(cRows + 1, 1))

With qtQtrResults
.WebFormatting = xlNone
.WebSelectionType = xlSpecifiedTables
.RefreshStyle = xlInsertDeleteCells
.WebTables = strWebTables
.Refresh

Do Until iRefresh = 1
If .Refreshing Then
iRefresh = 0
Else
iRefresh = 1
End If
Loop
End Wit

--
Louis LA
-----------------------------------------------------------------------
Louis LAI's Profile: http://www.excelforum.com/member.php...fo&userid=1562
View this thread: http://www.excelforum.com/showthread.php?threadid=27174

 
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
Web Query Refresh problem Tone Excel Discussion (Misc queries) 0 November 21st 05 12:12 PM
OLE object refresh Des Charts and Charting in Excel 0 April 29th 05 12:12 PM
Form 'Refresh' problem Stuart[_5_] Excel Programming 7 May 22nd 04 08:32 PM
Refresh Problem Robert Couchman[_4_] Excel Programming 1 February 20th 04 03:52 PM
Screen refresh problem. Nigel Brown[_2_] Excel Programming 0 September 17th 03 02:15 PM


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