PC Review


Reply
Thread Tools Rate Thread

Determining build date of an Add-in

 
 
Ed
Guest
Posts: n/a
 
      3rd Aug 2007
Please excuse the reposting. When I posted it before I had a
misspelling in the subject,
perhaps explaining the lack of response.

I would like a Help|About command on the menu created when my Add-in
is loaded.
In it I'd like to report a Version number and the timestamp for when I
last modified the
add-in. Here's what I have written:

Set wkbWkb = ThisWorkbook
strFileName = wkbWkb.Name
Set wksWks = wkbWkb.Worksheets("UserData")

strPath = wkbWkb.Path & "\" & strFileName
varDate = FileDateTime(strPath)

iCol = GetColIndex2(wksWks, "VERSION")
strVersion = wksWks.Cells(2, iCol)
strMsg = "JOC Membership Macro Package Version " & strVersion & "
Last modified " & varDate
MsgBox strMsg

As you can see, I get teh Version number out of cell stored in a
worksheet belonging to the add-in workbook.
That works fine.

What doesn't work is the way I attempt to get the "build date." I
would think that varDate would be reported
as the timestamp I see in Windows Explorer, i.e., the date I last
modified the .xla file. Instead, I get
a time stamp that seems to be the time the add-in is loaded.

Why does it behave this way? How can I get it to report the actual
last-modified date/time?

TIA

Ed



 
Reply With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      3rd Aug 2007

Ed,
After loading the file, go back into Windows Explorer and take a look
at the file date. Open files will display the date the file was opened not
the date modified.
You might want to enter the modified date into the add-in worksheet
and then read it from there.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Ed" <jag_manR__EM*-(E-Mail Removed)>
wrote in message
Please excuse the reposting. When I posted it before I had a
misspelling in the subject,
perhaps explaining the lack of response.

I would like a Help|About command on the menu created when my Add-in
is loaded.
In it I'd like to report a Version number and the timestamp for when I
last modified the
add-in. Here's what I have written:

Set wkbWkb = ThisWorkbook
strFileName = wkbWkb.Name
Set wksWks = wkbWkb.Worksheets("UserData")

strPath = wkbWkb.Path & "\" & strFileName
varDate = FileDateTime(strPath)

iCol = GetColIndex2(wksWks, "VERSION")
strVersion = wksWks.Cells(2, iCol)
strMsg = "JOC Membership Macro Package Version " & strVersion & "
Last modified " & varDate
MsgBox strMsg

As you can see, I get teh Version number out of cell stored in a
worksheet belonging to the add-in workbook.
That works fine.

What doesn't work is the way I attempt to get the "build date." I
would think that varDate would be reported
as the timestamp I see in Windows Explorer, i.e., the date I last
modified the .xla file. Instead, I get
a time stamp that seems to be the time the add-in is loaded.

Why does it behave this way? How can I get it to report the actual
last-modified date/time?

TIA

Ed



 
Reply With Quote
 
Ed
Guest
Posts: n/a
 
      3rd Aug 2007
Jim,

Well, I'll be darned. I have been using Windows since day 1, and DOS
before that, and did not
know that!

The method you suggested does work. I implemented it as a work-around
while waiting for an answer.
I have written a little macro that gets the timestamp with
FileDateTime() and writes it to the XLA worksheet.
The only problem is I have to do a save of the XLA and immediately
execute the macro and then do another save.
There will be a few seconds between the saved time and that which
shows in Windows Explorer, but that's close enough.

Thanks.

Ed

"Jim Cone" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Ed,
> After loading the file, go back into Windows Explorer and take a
> look
> at the file date. Open files will display the date the file was
> opened not
> the date modified.
> You might want to enter the modified date into the add-in worksheet
> and then read it from there.
> --
> Jim Cone
> San Francisco, USA
> http://www.realezsites.com/bus/primitivesoftware
> (Excel Add-ins / Excel Programming)
>




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining an annual review date from an employee start date Phrank Microsoft Excel Worksheet Functions 3 29th Nov 2007 06:37 AM
Formula for determining if two date columns fall within specific date range Igottabeme Microsoft Excel Worksheet Functions 2 21st Apr 2006 02:50 AM
Formula for determining if two date columns fall within specific date range Igottabeme Microsoft Excel Misc 1 20th Apr 2006 10:03 PM
Determining 'Build' date of a solution Roger Helliwell Microsoft ASP .NET 2 29th Apr 2005 04:32 PM
Determining build info? Bill Taylor Windows XP Hardware 2 28th Feb 2004 08:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:51 AM.