Quantcast
Channel: Função não retorna valor esperado
Viewing all articles
Browse latest Browse all 5

Função não retorna valor esperado

$
0
0
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


Viewing all articles
Browse latest Browse all 5


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>