?在线等待,如何获得一个文件的 大小 信息!

解决方案 »

  1.   

    Private Sub Command1_Click()
    Dim fso As New FileSystemObject, f As File
    Set f = fso.GetFile("c:\temp.txt")
    MsgBox f.Size & " byte"
    End Sub
      

  2.   

    strOpenFileName = frmMDI.CMDialog.Filename
            ' 如果文件大于 65K,则不能打开文件,取消操作。
    '        If FileLen(strOpenFileName) > 65000 Then
    '            MsgBox "文件太大,无法打开。"
    '            Exit Function
    '        End If
      

  3.   


    FSO 或 
    FileLen 函数。
    要不就用api 

    CreateFIle
    GetFileSize