[算表] 用巨集功能結果出現執行階段錯誤"5"
軟體:excel
版本:2013
第一次使用巨集功能,結果在執行巨集的時候卻出現:執行階段錯誤"5"程序
Sub L()
'
' L 巨集
'
' 快速鍵: Ctrl+Shift+Q
'
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Users\Pan\Desktop\111\1.", Destination:=Range("$A$1"))
.CommandType = 0
.Name = "1."
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 950
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1)
.TextFileFixedColumnWidths = Array(8, 37)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub
請問我該如何排除這個問題呢><?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 1.168.1.46
→
03/07 14:36, , 1F
03/07 14:36, 1F
→
03/07 18:03, , 2F
03/07 18:03, 2F
→
03/07 18:03, , 3F
03/07 18:03, 3F
Office 近期熱門文章
PTT數位生活區 即時熱門文章