Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default date function

I have a vba program that creating a seperate excel sheet. I want to
have a date entered on the created sheet for when it was created.
This date would be static and not change each time the new sheet was
opened or saved.

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default date function

Run this after you have created and Activated the sheet:

Sub marine()
Range("A1").Value = Date
End Sub



--
Gary''s Student - gsnu200766


" wrote:

I have a vba program that creating a seperate excel sheet. I want to
have a date entered on the created sheet for when it was created.
This date would be static and not change each time the new sheet was
opened or saved.

Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default date function

Do you want to place the date in a cell? If so, try this:

Sub CreateSheetWithDate()

Dim wks As Worksheet
Set wks = Sheets.Add

Range("a1").Value = "This sheet created on: " & Date

End Sub

HTH,
Matthew Pfluger

" wrote:

I have a vba program that creating a seperate excel sheet. I want to
have a date entered on the created sheet for when it was created.
This date would be static and not change each time the new sheet was
opened or saved.

Thanks in advance.

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
Function to lookup date on tab in excel and populate date on calen MGC Excel Worksheet Functions 0 February 4th 10 04:48 AM
Difference betwen Excel Date () Function and System Date Khalil[_2_] Excel Worksheet Functions 2 June 16th 09 01:10 PM
Function Excel:If a Dateactual date create a RED alert in a cel? Claudio Nacif Excel Programming 1 June 4th 07 04:00 AM
Date Function formula that will return the date of a specific week Greg Excel Worksheet Functions 4 June 12th 06 05:07 PM
Calculating days between current date and a date in future NETWORKDAYS() function Faheem Khan Excel Worksheet Functions 2 February 10th 05 07:18 PM


All times are GMT +1. The time now is 10:39 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"