'Core points of this execise :
'1. Open Text file
'2. Read line
Option Explicit
Dim fso,fil
'创建fso对象
Set fso=CreateObject("Scripting.FileSystemObject")
'打开文件
Set fil=fso.OpenTextFile ("c:\reg.txt",1)
'读取文件内容
Do While not fil.AtEndOfStream
MsgBox fil.ReadLine
Loop
'关闭文件
fil.Close
'释放文件
Set fil=Nothing
Set fso=Nothing