Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Getting the date from my left footer

Hi,
Im trying to get the date from my left footer. The date in the footer will
change over time.
In the footer it looks like this.
testBook.xls
Revised 7/30/2009
Im using this code to get the information, but now I need a way to either
put the last part of this string (the date) or something else that will get
me there.
textString = .LeftFooter
This is the line I used to get "&8&Fļ”ļ€*Revised 7/30/2009€. (The square means
return.)
Im using office 2003.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default Getting the date from my left footer

I believe that the revision date in the footer comes from:

ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")

That is a date/time field, so you can format it according to how you want to
use it (just date, etc)

HTH,
Keith

"Still_learning" wrote:

Hi,
Im trying to get the date from my left footer. The date in the footer will
change over time.
In the footer it looks like this.
testBook.xls
Revised 7/30/2009
Im using this code to get the information, but now I need a way to either
put the last part of this string (the date) or something else that will get
me there.
textString = .LeftFooter
This is the line I used to get "&8&Fļ”ļ€*Revised 7/30/2009€. (The square means
return.)
Im using office 2003.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Getting the date from my left footer

Hi, Ker_01
Getting the revision date is not the problem. The date in the left foot is
not automatically updated with the revision date. So, Im trying to make a
trigger that will fire when saving or closing that will get the date from the
left footer and then compare it with the BuiltinDocumentProperties("Last Save
Time"). If no change than do nothing if different then update the left footer
with the BuiltinDocumentProperties("Last Save Time").

"ker_01" wrote:

I believe that the revision date in the footer comes from:

ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")

That is a date/time field, so you can format it according to how you want to
use it (just date, etc)

HTH,
Keith

"Still_learning" wrote:

Hi,
Im trying to get the date from my left footer. The date in the footer will
change over time.
In the footer it looks like this.
testBook.xls
Revised 7/30/2009
Im using this code to get the information, but now I need a way to either
put the last part of this string (the date) or something else that will get
me there.
textString = .LeftFooter
This is the line I used to get "&8&Fļ”ļ€*Revised 7/30/2009€. (The square means
return.)
Im using office 2003.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Getting the date from my left footer

Here what my code or the top part of my code look like.

Sub testFooter()
Dim textString
Dim dateString
Dim testWord1
Dim testWord2
Dim testWord3
Dim fsMain
Dim fsFile
Dim revisedDate As Date
Dim upDate


Set fsMain = CreateObject("Scripting.FileSystemObject")
Set fsFile = fsMain.GetFile(ActiveWorkbook.Path & "\" &
ActiveWorkbook.Name)

With ActiveWorkbook.ActiveSheet
revisedDate = Format(CDate(fsFile.DateLastModified), "m/dd/yyyy")
End With

' "&8&F" & Chr(10) & "Revised " & revisedDate

testWord1 = Chr(10) & "SOA INTERNAL USE ONLY"
testWord2 = Chr(10) & "CONFIDENTIAL"
testWord3 = Chr(10) & "PUBLIC"

With ActiveSheet.PageSetup
textString = .LeftFooter

If textString = "&8&F" & Chr(10) & "Revised " & revisedDate Then
upDate = "stop"
Else
upDate = "go"
End If

I found that this will work but i'm still building on it.

"Still_learning" wrote:

Hi, Ker_01
Getting the revision date is not the problem. The date in the left foot is
not automatically updated with the revision date. So, Im trying to make a
trigger that will fire when saving or closing that will get the date from the
left footer and then compare it with the BuiltinDocumentProperties("Last Save
Time"). If no change than do nothing if different then update the left footer
with the BuiltinDocumentProperties("Last Save Time").

"ker_01" wrote:

I believe that the revision date in the footer comes from:

ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")

That is a date/time field, so you can format it according to how you want to
use it (just date, etc)

HTH,
Keith

"Still_learning" wrote:

Hi,
Im trying to get the date from my left footer. The date in the footer will
change over time.
In the footer it looks like this.
testBook.xls
Revised 7/30/2009
Im using this code to get the information, but now I need a way to either
put the last part of this string (the date) or something else that will get
me there.
textString = .LeftFooter
This is the line I used to get "&8&Fļ”ļ€*Revised 7/30/2009€. (The square means
return.)
Im using office 2003.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I create a text on the left or right like a header & footer charles Excel Discussion (Misc queries) 1 January 31st 07 12:19 AM
Want to use left and center footer in same page wjs-matt Charts and Charting in Excel 1 January 7th 06 02:18 AM
Want to use left and center footer on same page wjs-matt Excel Discussion (Misc queries) 1 January 6th 06 05:15 PM
Align Right footer text to Left Joel Mills Excel Programming 6 June 30th 05 09:52 PM
Left/Right Margins in Header/Footer BobB Excel Discussion (Misc queries) 1 November 29th 04 09:04 PM


All times are GMT +1. The time now is 01:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"