EliseFreedman
Programmer
Hi There
I hope someone can help me with this problem before I completely loose all my hair.
I have a spreadsheet set up to collate statistics. The spreadsheet summarises statistics from a variety of feeder worksheets. This has been working fine for months but suddenly has stopped working and Ive no idea why. The only change I can think of is that some extra rows were added to the worksheet. I dont think the issue lies here though as we tried going back to an older version of the worksheet and still got the same error.
I am getting an application defined or object defined error. It occurs on the last line. Can anyone shed any light on what could be causing this.
Elise
I hope someone can help me with this problem before I completely loose all my hair.
I have a spreadsheet set up to collate statistics. The spreadsheet summarises statistics from a variety of feeder worksheets. This has been working fine for months but suddenly has stopped working and Ive no idea why. The only change I can think of is that some extra rows were added to the worksheet. I dont think the issue lies here though as we tried going back to an older version of the worksheet and still got the same error.
I am getting an application defined or object defined error. It occurs on the last line. Can anyone shed any light on what could be causing this.
Elise
Code:
Sub JulyAttended()
'
' OctoberStats Macro
' Macro recorded 26/10/2007 by Elise.Freedman
'
Sheets("July Attended").Select
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:="TEXT;M:\depts\HS&ES\Medical\KAY STATS\Attended.txt", Destination _
:=Range("A1"))
.Name = "Attended_5"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 2
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=True