#1   Report Post  
D
 
Posts: n/a
Default Modified Date

Is there a way to put in the date when a user saves a document within the
spreadsheet? So that the next user can see when the spreadsheet was last
saved.
Thanks,
--
D
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default



--

HTH

RP
(remove nothere from the email address if mailing direct)


"D" wrote in message
...
Is there a way to put in the date when a user saves a document within the
spreadsheet? So that the next user can see when the spreadsheet was last
saved.
Thanks,
--
D



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
worksheets("Sheet1").Range("A1").Value = Format(Date,"dd mmm yyyy")
End Sub

Put this code in the ThisWorkbook code module.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"D" wrote in message
...
Is there a way to put in the date when a user saves a document within the
spreadsheet? So that the next user can see when the spreadsheet was last
saved.
Thanks,
--
D



  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

D

User Defined Function, not built-in.

Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function

In a cell enter...........

=DOCPROPS("author")
or
=DOCPROPS("last save time")

Gord Dibben Excel MVP

On Thu, 6 Jan 2005 13:25:07 -0800, "D" wrote:

Is there a way to put in the date when a user saves a document within the
spreadsheet? So that the next user can see when the spreadsheet was last
saved.
Thanks,


  #5   Report Post  
William
 
Posts: n/a
Default

Hi

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Sheets("Sheet1").Range("A1") = "Workbook last saved on " & _
Format(Now, "mmmm dd yyyy") & " at " & Format(Now, "hh:mm")
End Sub

--
XL2002
Regards

William



"D" wrote in message
...
| Is there a way to put in the date when a user saves a document within the
| spreadsheet? So that the next user can see when the spreadsheet was last
| saved.
| Thanks,
| --
| D




  #6   Report Post  
D
 
Posts: n/a
Default

Works great!
Thanks

"William" wrote:

Hi

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Sheets("Sheet1").Range("A1") = "Workbook last saved on " & _
Format(Now, "mmmm dd yyyy") & " at " & Format(Now, "hh:mm")
End Sub

--
XL2002
Regards

William



"D" wrote in message
...
| Is there a way to put in the date when a user saves a document within the
| spreadsheet? So that the next user can see when the spreadsheet was last
| saved.
| Thanks,
| --
| D



  #7   Report Post  
D
 
Posts: n/a
Default

Nevermind I got it. You gotta create and insert in a Module.
Duh!
Thanks.

"Gord Dibben" wrote:

D

User Defined Function, not built-in.

Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function

In a cell enter...........

=DOCPROPS("author")
or
=DOCPROPS("last save time")

Gord Dibben Excel MVP

On Thu, 6 Jan 2005 13:25:07 -0800, "D" wrote:

Is there a way to put in the date when a user saves a document within the
spreadsheet? So that the next user can see when the spreadsheet was last
saved.
Thanks,



  #8   Report Post  
D
 
Posts: n/a
Default

Where do I put the code in at? I right-click on the worksheet and go to "View
Code" but when I insert this code into the "ThisWorkbook"
When I insert "DOCPROPS("author") it returns a "#Name?" error
Should I insert the code in the worksheet instead of "ThisWorkbook"

"Gord Dibben" wrote:

D

User Defined Function, not built-in.

Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function

In a cell enter...........

=DOCPROPS("author")
or
=DOCPROPS("last save time")

Gord Dibben Excel MVP

On Thu, 6 Jan 2005 13:25:07 -0800, "D" wrote:

Is there a way to put in the date when a user saves a document within the
spreadsheet? So that the next user can see when the spreadsheet was last
saved.
Thanks,



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Modified Date

I get the same error "#Name" - what is the solution for this?

"D" wrote:

Where do I put the code in at? I right-click on the worksheet and go to "View
Code" but when I insert this code into the "ThisWorkbook"
When I insert "DOCPROPS("author") it returns a "#Name?" error
Should I insert the code in the worksheet instead of "ThisWorkbook"

"Gord Dibben" wrote:

D

User Defined Function, not built-in.

Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function

In a cell enter...........

=DOCPROPS("author")
or
=DOCPROPS("last save time")

Gord Dibben Excel MVP

On Thu, 6 Jan 2005 13:25:07 -0800, "D" wrote:

Is there a way to put in the date when a user saves a document within the
spreadsheet? So that the next user can see when the spreadsheet was last
saved.
Thanks,



  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Modified Date

Put it in a regular code module: In the Visual Basic Editor, with your
project selected, choose Insert/Module.

In article ,
debbieevans wrote:

I get the same error "#Name" - what is the solution for this?

"D" wrote:

Where do I put the code in at? I right-click on the worksheet and go to
"View
Code" but when I insert this code into the "ThisWorkbook"
When I insert "DOCPROPS("author") it returns a "#Name?" error
Should I insert the code in the worksheet instead of "ThisWorkbook"

"Gord Dibben" wrote:

D

User Defined Function, not built-in.

Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function

In a cell enter...........

=DOCPROPS("author")
or
=DOCPROPS("last save time")

Gord Dibben Excel MVP

On Thu, 6 Jan 2005 13:25:07 -0800, "D" wrote:

Is there a way to put in the date when a user saves a document within
the
spreadsheet? So that the next user can see when the spreadsheet was last
saved.
Thanks,




  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Modified Date

On the tab I select view code -Do I hilight all the code in the right hand
box? I tried this and then toolbar - insert - module , nothing happened I
kept seeing more and more modules appearing. I do not know vba so is it
possible to tell me in layman terms? People like me probably drive you mad. I
don't understand why Microsoft havent made this available without the vba
route........Yours hopefully

"JE McGimpsey" wrote:

Put it in a regular code module: In the Visual Basic Editor, with your
project selected, choose Insert/Module.

In article ,
debbieevans wrote:

I get the same error "#Name" - what is the solution for this?

"D" wrote:

Where do I put the code in at? I right-click on the worksheet and go to
"View
Code" but when I insert this code into the "ThisWorkbook"
When I insert "DOCPROPS("author") it returns a "#Name?" error
Should I insert the code in the worksheet instead of "ThisWorkbook"

"Gord Dibben" wrote:

D

User Defined Function, not built-in.

Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function

In a cell enter...........

=DOCPROPS("author")
or
=DOCPROPS("last save time")

Gord Dibben Excel MVP

On Thu, 6 Jan 2005 13:25:07 -0800, "D" wrote:

Is there a way to put in the date when a user saves a document within
the
spreadsheet? So that the next user can see when the spreadsheet was last
saved.
Thanks,



  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Modified Date

Perhaps this will help:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In article ,
debbieevans wrote:

On the tab I select view code -Do I hilight all the code in the right hand
box? I tried this and then toolbar - insert - module , nothing happened I
kept seeing more and more modules appearing. I do not know vba so is it
possible to tell me in layman terms? People like me probably drive you mad. I
don't understand why Microsoft havent made this available without the vba
route........Yours hopefully

  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Modified Date

thanks for your patience - do you happen to know where there is an online
training course for advanced excel and vba?

"JE McGimpsey" wrote:

Perhaps this will help:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In article ,
debbieevans wrote:

On the tab I select view code -Do I hilight all the code in the right hand
box? I tried this and then toolbar - insert - module , nothing happened I
kept seeing more and more modules appearing. I do not know vba so is it
possible to tell me in layman terms? People like me probably drive you mad. I
don't understand why Microsoft havent made this available without the vba
route........Yours hopefully


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
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 04:00 PM
Date Formula Robyn Bellanger Excel Discussion (Misc queries) 2 December 17th 04 08:25 PM
Date formula Robyn Bellanger Excel Discussion (Misc queries) 2 December 16th 04 01:41 AM
Problem with Date format from VBA code twig Excel Discussion (Misc queries) 3 December 7th 04 07:01 PM
How do I convert a Julian date into a regular date? Jessica Excel Discussion (Misc queries) 4 December 2nd 04 03:54 AM


All times are GMT +1. The time now is 09:32 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"