![]() |
Exel VBA - Sheets.Name
Hi everybody!
I have a following kind of problem and I'm very pleased if somebod could help me. I'm trying to name a sheet with a name referring to cell. Here is an example what I'm trying to do: I have a date in cell "A1" which is changing every day and I would lik to write a macro which creates a new name to old sheet when I do th macro. If the original sheet is called “Sheet1” after doing this macr it should be e.g. “Sheet118.6.2004” or “18.6.2004”. I tried to find a way to do this with Sheets.Name, but I couldn’t fin the right way. Actually I don’t now if it’s even possible but I hop that somebody knows. Thank you very much if you could help me! -Tims -- Message posted from http://www.ExcelForum.com |
Exel VBA - Sheets.Name
this should do the trick
Sub SheetName() dt = Format(Date, "dd.mm.yy") ActiveSheet.Name = "Sheet-" & dt End Sub - Mangesh Goa, Indi -- Message posted from http://www.ExcelForum.com |
Exel VBA - Sheets.Name
|
All times are GMT +1. The time now is 07:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com