A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Links and Linking
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Embedding file name in a Cell



 
 
Thread Tools Display Modes
  #1  
Old January 5th, 2005, 06:18 AM
Mark Sowerbutts
external usenet poster
 
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  
Old January 5th, 2005, 03:28 PM
JE McGimpsey
external usenet poster
 
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  
Old January 5th, 2005, 03:32 PM
JE McGimpsey
external usenet poster
 
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.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 06:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.