Sub pMain() Debug.Print pGetFileLen("c:\temp\demos.ds") End Sub Private Function pGetFileLen(strFilePath As String) As String Static oFS As Object 'Scripting.FileSystemObject Dim ret As String If oFS Is Nothing Then Set oFS = CreateObject("Scripting.FileSystemObject") End If If oFS.FileExists(strFilePath) Then ret = oFS.GetFile(strFilePath).Size Else ret = "Arquivo não existe." End If pGetFileLen = ret End Function
Felipe Costa Gualberto - http://www.ambienteoffice.com.br