If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
SAVE function
Can you put a date on the sheet and only have it change automatically if the
file is saved? if so please indicate exactly how. thanks |
#2
|
|||
|
|||
Hi
use the following UDF (only on workbook level): 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 and enter in a cell =DOCPROPS("last save time") (format cell as date) for more about UDFs see: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kabel Frankfurt, Germany itsme wrote: Can you put a date on the sheet and only have it change automatically if the file is saved? if so please indicate exactly how. thanks |
#3
|
|||
|
|||
Yes this can be done using VBA and the workbook_beforesave event:
Right-click on the Excel icon (situated immediately on the left of the File Menu), choose View Code and paste and amend accordingly the following code : Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Worksheets("Feuil1").Range("A10").Value = Now End Sub This will put the date and time in A10 of sheet "Feuil1" each time a save operation has been called from the workbook. HTH Cordially Pascal "itsme" a écrit dans le message de ... Can you put a date on the sheet and only have it change automatically if the file is saved? if so please indicate exactly how. thanks |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UK postcode issue | Lapchien | Running & Setting Up Queries | 6 | June 11th, 2004 09:06 PM |
WEEKNUM function | david p | Worksheet Functions | 8 | March 13th, 2004 03:24 PM |
Function not evaluated | Srinivas Chundi | Worksheet Functions | 1 | January 31st, 2004 07:37 PM |