Private Sub Command1_Click()
dim dd as string, ss as string
list1.clear
dd=dir("e:\tmp\*.txt")
do until dd=""
open "e:\tmp\" & dd for input as #1
do until eof(1)
line input #1,ss
list1.additem ss
loop
close #1
dd=dir
loop
End Sub
以上代码是以e:\tmp文件夹的所有txt文件为例,自己修改
温馨提示:答案为网友推荐,仅供参考