QueryTables Error
When I run the code below (the IP is masked) using the F8
button in VBA it runs fine, but when I try to us it in run time I get the Error 91 Object variable or with block variable not set. How can I overcome this? With ActiveSheet.QueryTables.Add(Connection:= _ "URL;http://" _ & "123.12.12.12" _ & "/MD/version.asp" _ & "?MyPassword=MD1234" _ , Destination:=ActiveWorkbook.ActiveSheet.Range ("A1")) .Name = "" .FieldNames = False .RowNumbers = False .FillAdjacentFormulas = False .RefreshOnFileOpen = False .BackgroundQuery = False .RefreshStyle = xlOverwriteCells .SavePassword = False .SaveData = False .Refresh BackgroundQuery:=False End With .. Thanks, Greg |
All times are GMT +1. The time now is 09:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com