Oliver Dewar
Board Regular
- Joined
- Apr 17, 2011
- Messages
- 201
Hi All,
I need to enter the current time into a cell using VBA in this format:
HH:MM am/pm - so no seconds.
eg
10:10 am
At the moment I'm using:
and am getting the annoyingly precise seconds in the cell as well.
This time will be added to a string of text in the cell so I cannot simply format the cell.
Any help you can give me will be greatly appreciated.
I need to enter the current time into a cell using VBA in this format:
HH:MM am/pm - so no seconds.
eg
10:10 am
At the moment I'm using:
Code:
range("A1").value = Time
and am getting the annoyingly precise seconds in the cell as well.
This time will be added to a string of text in the cell so I cannot simply format the cell.
Any help you can give me will be greatly appreciated.