我刚刚编辑的,请试用。如下代码可实现提取第四行第四列的数据。
Sub xxx()
Dim myFile As String
Dim myText As String
Dim myString As String
Dim i As Single
With Application.FileDialog(msoFileDialogFolderPicker)
.Show
.AllowMultiSelect = False
myFile = .SelectedItems(1)
End With
myText = Dir(myFile & "\" & "*.txt")
Do While Len(myText) <> 0
Open myFile & "\" & myText For Input As #1
myText = Split(Split(VBA.StrConv(InputB(LOF(1), 1), vbUnicode), Chr(10))(3), vbTab)(3) '4行4列,如果其余行或列数则更改相应的数字
Debug.Print myText
Close
myText = Dir
Loop
End Sub
弄好了没,如果没弄好我来