![]() |
Sheet tabs with Date and Time
I would like to name a sheet tab with the current date and
time using the NOW or DATE and TIME commands. But I am having some problems with the (/) and (:) in the sheet tab. I can replace the (/) with a (-) but haven't found a solution for the(:) without the time looking goofy. Appreciate the help. |
Sheet tabs with Date and Time
Hi JT
Not pretty but I also use the - for the time ActiveSheet.Name = Format(Now, "dd-mm-yy h-mm-ss") -- Regards Ron de Bruin http://www.rondebruin.nl "JT" wrote in message ... I would like to name a sheet tab with the current date and time using the NOW or DATE and TIME commands. But I am having some problems with the (/) and (:) in the sheet tab. I can replace the (/) with a (-) but haven't found a solution for the(:) without the time looking goofy. Appreciate the help. |
Sheet tabs with Date and Time
You just can't use / or : in a sheet name, so you will have to use something
you understand. You could use a dot . for the time. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "JT" wrote in message ... I would like to name a sheet tab with the current date and time using the NOW or DATE and TIME commands. But I am having some problems with the (/) and (:) in the sheet tab. I can replace the (/) with a (-) but haven't found a solution for the(:) without the time looking goofy. Appreciate the help. |
Sheet tabs with Date and Time
Formatting with the year first so you can sort sheetnames,
ActiveSheet.Name = Format(Now, "yyyy-mm-dd_hhmm") would make a lot more sense to me. or for a files the filenames in a directory. fname = "c:\mybackup\B" & Format(Now(), "yyyy_mmdd") & ".txt" A macro to sort worksheets can be found at http://www.mvps.org/dmcritchie/excel...#sortallsheets --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Ron de Bruin" wrote in message ... Hi JT Not pretty but I also use the - for the time ActiveSheet.Name = Format(Now, "dd-mm-yy h-mm-ss") -- Regards Ron de Bruin http://www.rondebruin.nl "JT" wrote in message ... I would like to name a sheet tab with the current date and time using the NOW or DATE and TIME commands. But I am having some problems with the (/) and (:) in the sheet tab. I can replace the (/) with a (-) but haven't found a solution for the(:) without the time looking goofy. Appreciate the help. |
Sheet tabs with Date and Time
Hi,
For time separator try using Chr(166) - looks ok, pretty much like some alarm radio display... hth Paul Uzytkownik "JT" napisal w wiadomosci ... I would like to name a sheet tab with the current date and time using the NOW or DATE and TIME commands. But I am having some problems with the (/) and (:) in the sheet tab. I can replace the (/) with a (-) but haven't found a solution for the(:) without the time looking goofy. Appreciate the help. |
All times are GMT +1. The time now is 01:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com