![]() |
Formatting a row to insert current date and time on demand
I would like to have an icon to select that will insert the current date and
time. I attempted to make a macro to accomplish this and it worked great UNTIL I figured out that every time I entered a new date, it changed them ALL. I need for the date and time to be possibly different. When I use Ctrl + ; I get the date then space once and use Ctrl + Shift + ; and you get the time. This works great however I dont want to do this every time I need this data. PLEASE HELP! :( Signed Frustrated in SC.... |
Formatting a row to insert current date and time on demand
One way:
Public Sub InsertDateAndTimeInActiveCell() With ActiveCell .Value = Now .NumberFormat = "dd mmmm yyyy hh:mm:ss" End With End Sub In article , MorseCode wrote: I would like to have an icon to select that will insert the current date and time. I attempted to make a macro to accomplish this and it worked great UNTIL I figured out that every time I entered a new date, it changed them ALL. I need for the date and time to be possibly different. When I use Ctrl + ; I get the date then space once and use Ctrl + Shift + ; and you get the time. This works great however I dont want to do this every time I need this data. PLEASE HELP! :( Signed Frustrated in SC.... |
All times are GMT +1. The time now is 04:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com