E
Eldraad
Here is the problem that is knawing on my mind...
I created a macro using the Record Macro function to import a specifi
text report when the workbook is opened. It worked fine. I had t
change the address in the macro so it could find the file when I was a
work. The file will be placed in the My Documents folder just like i
is on my home machine. The only difference is mine is i
/Administrator/My Documents and the one for work has /Circulation/M
Documents. I made the change to the macro and now it can not find th
text file. I changed the address back to my home system (at home) an
it STILL can't find the text file. I get the following Erro
Message...
Excel cannot find the text file to refresh this external data range.
Check to make sure the file has not been renamed (etc.)
Here is the copy of the macro that WORKS:
Sub air_weight_convert()
'
' air_weight_convert Macro
' Macro recorded 7/23/2004 by Eldraad
'
'
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Documents and Settings\Administrator\M
Documents\airweight.txt", _
Destination:=Range("A1"))
.Name = "airweight_2"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileFixedColumnWidths = Array(6, 48, 12, 9, 6, 14, 2, 5
25)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub
And here is a copy of the one that does NOT work:
Sub air_weight_convert()
'
' air_weight_convert Macro
' Macro recorded 7/23/2004 by Eldraad
'
'
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Documents and Settings\Administrator\M
Documents\airweight.txt", _
Destination:=Range("A1"))
.Name = "airweight_2"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileFixedColumnWidths = Array(6, 48, 12, 9, 6, 14, 2, 5
25)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub
What is the difference and way does it no longer start?
This is really strting to make me nuts! What could it be? Refresh o
file open is true and everything seems the same, yet One workbook work
and the other doesn't. The ONLy difference is the name of the workboo
(that was changed from "My Woking PO" to "Automatic PO".
Any ideas? All are welcome at this point
I created a macro using the Record Macro function to import a specifi
text report when the workbook is opened. It worked fine. I had t
change the address in the macro so it could find the file when I was a
work. The file will be placed in the My Documents folder just like i
is on my home machine. The only difference is mine is i
/Administrator/My Documents and the one for work has /Circulation/M
Documents. I made the change to the macro and now it can not find th
text file. I changed the address back to my home system (at home) an
it STILL can't find the text file. I get the following Erro
Message...
Excel cannot find the text file to refresh this external data range.
Check to make sure the file has not been renamed (etc.)
Here is the copy of the macro that WORKS:
Sub air_weight_convert()
'
' air_weight_convert Macro
' Macro recorded 7/23/2004 by Eldraad
'
'
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Documents and Settings\Administrator\M
Documents\airweight.txt", _
Destination:=Range("A1"))
.Name = "airweight_2"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileFixedColumnWidths = Array(6, 48, 12, 9, 6, 14, 2, 5
25)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub
And here is a copy of the one that does NOT work:
Sub air_weight_convert()
'
' air_weight_convert Macro
' Macro recorded 7/23/2004 by Eldraad
'
'
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Documents and Settings\Administrator\M
Documents\airweight.txt", _
Destination:=Range("A1"))
.Name = "airweight_2"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileFixedColumnWidths = Array(6, 48, 12, 9, 6, 14, 2, 5
25)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub
What is the difference and way does it no longer start?
This is really strting to make me nuts! What could it be? Refresh o
file open is true and everything seems the same, yet One workbook work
and the other doesn't. The ONLy difference is the name of the workboo
(that was changed from "My Woking PO" to "Automatic PO".
Any ideas? All are welcome at this point