Hello.
I was wondering if it was possiable to use vba to find the version of a program. I know it can be done with windows and any office but can it be done to find the version of a non-microsoft application?
Thank you
Can you use VBA to find a programs version?
-
- NewLounger
- Posts: 5
- Joined: 30 Apr 2013, 13:24
-
- Administrator
- Posts: 78788
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Can you use VBA to find a programs version?
You can use code like this:
Code: Select all
Sub GetVersion()
Dim fso As Object
Dim strVersion As String
Set fso = CreateObject("Scripting.FileSystemObject")
strVersion = fso.GetFileVersion("C:\Program Files (x86)\CCleaner\CCleaner64.exe")
MsgBox strVersion
End Sub
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 5
- Joined: 30 Apr 2013, 13:24
Re: Can you use VBA to find a programs version?
Thank you. It works like a charm.