sprivatester
New Member
- Joined
- Aug 15, 2021
- Messages
- 1
- Office Version
- 2019
- 2010
- Platform
- Windows
following vba webquery works perfectly in excel 2010 but goes on forever waiting mode in excel 2019, debugging shows error on, .Refresh BackgroundQuery:=False
With Sheets("Sheet2").QueryTables.Add(Connection:= _
"URL;http://www.nseindia.com/products/dynaContent/equities/indices/total_returnindices.jsp?indexType=" + indexName + "&fromDate=" + startDate + "&toDate=" + endDate _
, Destination:=Sheets("Sheet2").Range("$a$1"))
.Name = _
"historicalindices.jsp?indexType=CNX%20100&fromDate=01-01-2014&toDate=01-10-2014"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingAll
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Thanks for all the help I got for so many years from mrexcel without even registering! But, this problem I could not find in any other posts. So, registered and opened my first post
With Sheets("Sheet2").QueryTables.Add(Connection:= _
"URL;http://www.nseindia.com/products/dynaContent/equities/indices/total_returnindices.jsp?indexType=" + indexName + "&fromDate=" + startDate + "&toDate=" + endDate _
, Destination:=Sheets("Sheet2").Range("$a$1"))
.Name = _
"historicalindices.jsp?indexType=CNX%20100&fromDate=01-01-2014&toDate=01-10-2014"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingAll
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Thanks for all the help I got for so many years from mrexcel without even registering! But, this problem I could not find in any other posts. So, registered and opened my first post