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. |
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. |
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. |
All times are GMT +1. The time now is 05:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com