V

【VBA】读取文本文件代码

肉松 笔记 2019-11-15
  Sub inputtxt()
    Dim s As String, i As Long
    Open "C:\Users\i\Desktop\xxx.txt" For Input As #1
    i = 1
    Do While Not EOF(1)
        Line Input #1, s
        Cells(i, 1) = s
        i = i + 1
    Loop
    Close #1
    MsgBox "ok!"
  End Sub
PREV
携号转网试运行
NEXT
让黑群晖识别多个网口

评论(2)

发布评论
  1. 标记!

    1. 原来是4T大佬,欢迎!