Private SubDrivel_Change() Dirl.Path= (1) ’户选择的驱动器反映到目录列表框中 End Sub Private SubDirl_Change() Filel.Path= (2) ’用户选择的文件夹改变文件列表框内容 End Sub Private Sub sum_Click() Dim (3) As New FileSystemOject, (4) As TextStxeam ’创建自己的文件系统对象,说明自己的文本流对象 If RightDirl.Path,1)="\"Then SetmyTextFile=fso.OpenTextFileDirl.Path+Filel.FileNamc) Else SetmyTextFile=fso.OpenTextFileDirl.Path+”\’+Filel.FileName) End“ S=0 Do d=Val (myTextFilE.ReadRow) S=S+d Loop While (5) Textl.Text=Str$(S) End Sub