Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
-- 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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date updates from worksheet to chart & changes date to a date series! Help!! | Charts and Charting in Excel | |||
Date Formula | Excel Discussion (Misc queries) | |||
Date formula | Excel Discussion (Misc queries) | |||
Problem with Date format from VBA code | Excel Discussion (Misc queries) | |||
How do I convert a Julian date into a regular date? | Excel Discussion (Misc queries) |