Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
QueryTables Object Variable or With Block Variable Not Set
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Runtime Error '91' Object variable or With block variable not set | Excel Discussion (Misc queries) | |||
object variable or with block variable not set | Excel Discussion (Misc queries) | |||
Pivot Table - Object variable or with block variable not set? | Excel Programming | |||
Error 91 - Object variable with block variable not set | Excel Programming | |||
Object Variable or With Block variable not set? | Excel Programming |