Dim fso, gfiles, filespec
'filespec = "C:\testfile.txt"
filespec = "C:\vbsample.xlsx"
Set fso = CreateObject("Scripting.FileSystemObject")
Set gfiles = fso.GetFile(filespec)
MyReturn = gfiles.Name & " File Type Is : " & gfiles.Type
MsgBox MyReturn
No comments:
Post a Comment