ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Progressbar on userform for waiting querytable retrieving data from web (https://www.excelbanter.com/excel-programming/392965-progressbar-userform-waiting-querytable-retrieving-data-web.html)

[email protected]

Progressbar on userform for waiting querytable retrieving data from web
 
Dear all,
i'm getting crazy to understand how to show progress of querytables
retrieving data from website.
I tried userform show but it seems by this method i stop query working
What I want to do is to show a progress bar on userform to count how
many time do i need to wait till data retrieving from website by
querytable

many thanks for your precious help

bye


Tom Ogilvy

Progressbar on userform for waiting querytable retrieving data fro
 
I doubt this is possible since the refresh is a single command.

--
Regards,
Tom Ogilvy


" wrote:

Dear all,
i'm getting crazy to understand how to show progress of querytables
retrieving data from website.
I tried userform show but it seems by this method i stop query working
What I want to do is to show a progress bar on userform to count how
many time do i need to wait till data retrieving from website by
querytable

many thanks for your precious help

bye



NickHK

Progressbar on userform for waiting querytable retrieving data from web
 
You say "query tables" (plural), so may be this.
Depends what/how you are doing your progress bar.


Private Sub CommandButton1_Click()
Dim WS As Worksheet
Dim QTCount As Long
Dim QT As QueryTable

For Each WS In ThisWorkbook.Worksheets
QTCount = QTCount + WS.QueryTables.Count
'Set the Max value of the progress bar
Debug.Print "Queries in WB: " & QTCount
Next

QTCount = 0

For Each WS In ThisWorkbook.Worksheets
For Each QT In WS.QueryTables
QT.Refresh False
QTCount = QTCount + 1
'Update the progress bar
Debug.Print "Queries processed: " & QTCount
Next
Next

End Sub

NickHK

wrote in message
oups.com...
Dear all,
i'm getting crazy to understand how to show progress of querytables
retrieving data from website.
I tried userform show but it seems by this method i stop query working
What I want to do is to show a progress bar on userform to count how
many time do i need to wait till data retrieving from website by
querytable

many thanks for your precious help

bye




[email protected]

Progressbar on userform for waiting querytable retrieving data from web
 
I have for example the following part of code:

With ActiveSheet.QueryTables.Add(Connection:="URL;http://
www.amazon.com/s/ref=nb_ss_gw/105-8148871-0525223?url=search-alias%3Daps&field-keywords="
& chiave & "&Go.x=10&Go.y=11", Destination:=Range("A1"))
.Name = "?"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With

so NickHK where can i fill your code to progress query time working???

thanks a lot


NickHK

Progressbar on userform for waiting querytable retrieving data from web
 
If it is just this one querytable, then you cannot, because as Tom pointed
out, the refresh is a single action and you get no feed back.

NickHK

wrote in message
ups.com...
I have for example the following part of code:

With ActiveSheet.QueryTables.Add(Connection:="URL;http://

http://www.amazon.com/s/ref=nb_ss_gw...lias%3Daps&fie
ld-keywords="
& chiave & "&Go.x=10&Go.y=11", Destination:=Range("A1"))
.Name = "?"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With

so NickHK where can i fill your code to progress query time working???

thanks a lot





All times are GMT +1. The time now is 01:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com