Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default 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
Reply
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
Using Add Method of QueryTables gives error Shilps Excel Programming 1 April 22nd 04 03:49 PM
ActiveSheet.QueryTables.Add using a File DSN Brian Howenstein Excel Programming 1 April 6th 04 11:45 AM
With ActiveSheet.QueryTables.Add [email protected] Excel Programming 4 January 6th 04 04:58 PM
QueryTables Interrupt if URL is Down Steve Hieb Excel Programming 0 November 17th 03 10:07 PM


All times are GMT +1. The time now is 02:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"