内容如上:

解决方案 »

  1.   

    '查找特定路径下某种类型文件,将名称保存在数组中,Ubound(数组)的值即为文件个数
    Sub aaa()
        Dim strFileName() As String
        Dim FileName As String
        Dim j As Long
        j = -1
        FileName = Dir(你的路径 & "*.*")
        Do While FileName <> ""
             If FileName <> "." And FileName <> ".." Then
                  j = j + 1
                  ReDim Preserve strFileName(j + 1)
                  strFileName(j) = FileName
             End If
             FileName = Dir   ' 查找下一个文件。
        Loop
    End Sub
      

  2.   

    最简单的办法,用VB标准的filelist控件,不会动态加载的,那就放一个隐藏的FileList控件就行了。
    呵呵,多注意一下VB标准控件啊。