Be the first user to complete this post

  • 0
Add to List

FileSystemObject : GetFileVersion Method

Description: 

Returns the version number of a specified file.

Format : 

objectOfFileSystemObject. GetFileVersion (filespec)

objectOfFileSystemObject : As the name says, it’s a FileSystemObject.

Arguments: 
  • filespec
    • Mandatory
    • Type:     String
    • Specific file path
Function FnGetFileVersion(strSpecificFilePath)

    Set fso = CreateObject("Scripting.FileSystemObject")

    file = fso.GetFileVersion(strSpecificFilePath)

   FnGetFileVersion = file

End Function

Msgbox  FnGetFileVersion ("c:\New Folder\file.txt")



Also Read:

  1. FileSystemObject in Excel Macro
  2. FileSystemObject : DriveExists Method
  3. VBA-Excel: Add/Insert multiple objects from a folder in an Excel Document.
  4. FileSystemObject : GetExtensionName Method
  5. FileSystemObject : GetDriveName Method
  6. Excel-VBA : Insert Multiple Images from a Folder to Excel Cells
  7. FileSystemObject:OpenTextFile Method