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: 14
Default Run-time Error '-2147417848 (80010108)'

I have a macro that is doing a number of things, starting with importing a
txt file. When I try to run it, I get this error: "Run-time Error
'-2147417848 (80010108)' Automation Error The object invoked has
disconnected from its clients.

When I Debug. it goes to the following line within the code ".Refresh
BackgroundQuery:=False" I have tried everything I know to fix it (granted,
that is not very much). Below is the code.

Any help would be appreciated. Thanks in advance.

Workbooks.Add
With ActiveSheet.QueryTables.Add(Connection:="TEXT;C:\D ata\SALES.TXT", _
Destination:=Range("A1"))
.Name = "SALES"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = -536
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(2, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileFixedColumnWidths = Array(26, 14, 7, 11, 1, 17, 17, 8, 3)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub




 
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
Run Time Error 2147417848 - 80010108 method Copy of Object Range F RonKay Excel Programming 1 October 19th 07 06:36 AM
Runtime Error '-2147417848 (80010108)' Ian Excel Programming 3 February 19th 07 02:22 PM
Macro does not work after the program has been restarted in excel.Run time error 2147417848 (80010108) Method visible of object_worksheet failed [email protected] Excel Programming 7 August 24th 05 03:11 PM
Excel Bug: Run-time error '-2147417848 (80010108)' majikman[_18_] Excel Programming 1 May 13th 04 08:16 PM
Run time error 2147417848(80010108) Praveen Excel Programming 4 December 18th 03 10:23 AM


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

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"