Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mark Sowerbutts
 
Posts: n/a
Default 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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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.

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
Display cell value on a chart. Andrew Constantinidis Charts and Charting in Excel 1 January 8th 05 05:36 AM
How do I set a cell to "Empty" so that it does not display in a ch Ian Charts and Charting in Excel 3 January 7th 05 02:12 AM
make a cell empty based on condition mpierre Charts and Charting in Excel 2 December 29th 04 02:01 PM
Cell value as chart scale maximum Phil Hageman Charts and Charting in Excel 9 December 17th 04 03:09 PM
File asks to update when no links were created Dave Links and Linking in Excel 1 December 16th 04 09:10 PM


All times are GMT +1. The time now is 11:16 AM.

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"