Revision Number for an Add-In

R

RST

I am trying to reference the Revision Number of an Excel Add-In using VBA to
determine if the user has the latest version of the Add-In installed. I
figured the best way would be to use a Scripting.FileSystemObject to get to
it, but I'm having a little trouble. Here's what I have:

Dim fs, f
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(vPath & "\AddIn.xla")

I've tried several different ways to get to the Revision number...such as:
vRevNo = f.RevisionNumber

But that didn't seem to work. Does anyone know how to tap into this field
easily? Thanks.
 
C

Charles Chickering

Dim wb As Workbook
Set wb = "YourAddin.xla"
MsgBox wb.BuiltinDocumentProperties("Revision Number")
 
R

RST

It doesn't seem to like this either. It won't run the Set wb =
"YourAddin.xla" line. Is it because the add in isn't technically an open
workbook?
RST
 
R

RST

Thanks! Got it to work with the following code:

vRevNo = Workbooks("AddIn.xla").BuiltinDocumentProperties("Revision Number")

RST
 
P

Peter T

I misunderstood, I thought you meant the file was not open. But if open
indeed your code should work.

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top