Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Writing saveing date in cell when saveing.


Hello.

I have a problem I don't know how to solve.
I want my workbook to write the current day in cell A1 when I save my
workbook.
Is there a built in function for this or how do I write it in VBA?

/Anders


--
a94andwi
------------------------------------------------------------------------
a94andwi's Profile: http://www.excelforum.com/member.php...o&userid=21077
View this thread: http://www.excelforum.com/showthread...hreadid=384312

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 221
Default Writing saveing date in cell when saveing.

Hi, Anders. Open your workbook. Hit Alt+F11 to open the Visual Basic Editor.
Place the following code in the ThisWorkbook module of your workbook. Change
("Sheet1").Range("A1") to the location where you want the date in your
workbook.


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Sheets("Sheet1").Range("A1") = Now
End Sub
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com



"a94andwi" wrote in
message ...

Hello.

I have a problem I don't know how to solve.
I want my workbook to write the current day in cell A1 when I save my
workbook.
Is there a built in function for this or how do I write it in VBA?

/Anders


--
a94andwi
------------------------------------------------------------------------
a94andwi's Profile:

http://www.excelforum.com/member.php...o&userid=21077
View this thread: http://www.excelforum.com/showthread...hreadid=384312



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Writing saveing date in cell when saveing.

Sub AddListBox()
With ActiveSheet.ListBoxes.Add(314.25, 51.75, 63, 246.75)
.Select
With Selection
.ListFillRange = "MyListData"
.LinkedCell = "$G$3"
End With
End With
End Sub

"a94andwi" wrote:


Hello.

I have a problem I don't know how to solve.
I want my workbook to write the current day in cell A1 when I save my
workbook.
Is there a built in function for this or how do I write it in VBA?

/Anders


--
a94andwi
------------------------------------------------------------------------
a94andwi's Profile: http://www.excelforum.com/member.php...o&userid=21077
View this thread: http://www.excelforum.com/showthread...hreadid=384312


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
saveing a spreadsheet as html want to keep the outline useable matt Excel Discussion (Misc queries) 0 May 27th 10 11:00 PM
problem saveing excell worksheet karspoz Excel Discussion (Misc queries) 1 March 9th 09 10:38 PM
Saveing workbook to a file as todays date daily mikespeck Excel Worksheet Functions 0 August 22nd 06 01:27 PM
Automation remote saveing help needed Kelvin Thomson Excel Programming 1 February 24th 04 02:46 PM
Saveing a file (Confirm Replace) rudolpsh[_5_] Excel Programming 4 January 26th 04 11:04 AM


All times are GMT +1. The time now is 12:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"