# Re: 错误修正

Posted by Spencer Yang on March 30, 1999 at 01:22:37:

In Reply to: Re: Answer "使用 FileSystemObject 来取得某目录内的所有档案" posted by Rong on March 29, 1999 at 20:42:54:

抱歉，若干单字拼写错误，正确如下：
Private Sub Form_Load()
Dim fso As New FileSystemObject
Dim fld As Folder
Dim fil As File
Dim strPath As String
strPath = "c:\"
Set fld = fso.GetFolder(strPath)
ListView1.View = lvwList ' 全部显示
For Each fil In fld.Files
ListView1.ListItems.Add , , fil.Name
Next

End Sub

Follow Ups: