LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Query Error

I get this error:
Run-time error '-2147417848 (80010108)

Automation error
The object invoked has disconnected from its clients

Here is my code. It crashes on the .Refresh BackgroundQuery:=False

Sub LoadAssays()
With ActiveSheet.QueryTables.Add(Connection:= _
"FINDER;\\Server1\data\Engineering\Assay.dqy", Destination:= _
Range("A1"))
.Name = "Assay"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = True
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.Refresh BackgroundQuery:=False
End With
End Sub

Here is the situation. I run it once and it is fine. It loads everything
into a spreadsheet. I close the spreadsheet and then run it again and I get
this error. Do I need to 'close' the connection so I can re-establish it?
If so how do I do this.

Thanks a bunch, everyone here are a great help!
Chad


 
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
web query error Vijay Kotian Excel Discussion (Misc queries) 0 September 11th 07 10:22 AM
MS Query error Ken W Excel Worksheet Functions 1 April 6th 06 04:08 PM
MS query error Ken W Excel Discussion (Misc queries) 0 March 30th 06 01:37 PM
error using MS query Ken W Excel Discussion (Misc queries) 0 March 6th 06 03:47 AM
Run-query error JohnDing[_2_] Excel Programming 3 December 1st 04 12:07 PM


All times are GMT +1. The time now is 12:26 PM.

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

About Us

"It's about Microsoft Excel"