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
|
|||
|
|||
Embedding file name in a Cell
Anyone know how to link / write the excel spreadsheet file name into a cell
in the actual spreadsheet? I know you can do it in the header / footer ... that's not what I need. Also, how about the "Last Printed" or "Last Saved" date saved to a cell in the spreadsheet. Thanks, Mark |
#2
|
|||
|
|||
Take a look he
http://www.mcgimpsey.com/excel/formu..._function.html In article , "Mark Sowerbutts" wrote: Anyone know how to link / write the excel spreadsheet file name into a cell in the actual spreadsheet? I know you can do it in the header / footer ... that's not what I need. |
#3
|
|||
|
|||
You'd need to use VBA. Put these in your workbook code module
Private Sub Workbook_BeforePrint(Cancel As Boolean) With Range("A1") .Value = Date .NumberFormat = "dd mmm yyyy" End With End Sub Private Sub Workbook_BeforeSave( _ ByVal SaveAsUI As Boolean, Cancel As Boolean) With Range("A1") .Value = Date .NumberFormat = "dd mmm yyyy" End With End Sub adjust the range reference as desired. Note that this will put the date in even if the user cancels the save or print. If you're new to macros, see David McRitchie's "Getting Started with Macros": http://www.mvps.org/dmcritchie/excel/getstarted.htm In article , "Mark Sowerbutts" wrote: Also, how about the "Last Printed" or "Last Saved" date saved to a cell in the spreadsheet. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Jet35.sp3 | doglover | Database Design | 3 | August 26th, 2004 04:41 PM |
Cell Contents Saved in File Name? | Laurie Pasion | Worksheet Functions | 1 | August 3rd, 2004 02:20 AM |
Application must be installed to run Error | Keith | Setup, Installing & Configuration | 1 | June 29th, 2004 03:02 AM |
export excelsheet into text file | Mili | Worksheet Functions | 6 | October 23rd, 2003 07:22 PM |