|
これだとどうですか?
遅いかもしんないけど。
Dim FileN As String, AcShn As String, Cbn As String, CpBn As String
Dim BEr As Long
FileN = Application.GetOpenFilename("リストファイル(*.lst),*.lst")
If FileN = "False" Then
End
End If
AcShn = ActiveSheet.Name
Workbooks.OpenText FileName:=FileN, StartRow:=34, DataType _
:=xlDelimited, TextQualifier:=xlNone, ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, Comma:=False, Space:=True, Other:=True, _
OtherChar:="|", FieldInfo:=Array(Array(1, 9), Array(2, 1), Array(3, 1), Array(4, 9), Array(5, 9), Array(6, 9), Array(7, 9), Array(8, 9))
Cbn = Dir(FileN)
ThisWorkbook.Activate
CpBn = Left(Cbn, Len(Cbn) - 4)
BEr = Workbooks(Cbn).Sheets(CpBn).Range("B1").End(xlDown).Row
ThisWorkbook.Sheets(AcShn).Range("A1:A" & BEr).Value = Workbooks(Cbn).Sheets(CpBn).Range("B1:B" & BEr).Value
|
|