Dear friends,
In my excel sheet; I want to assign macro for form button; if I click this button, then I should get system time on the next column of the button.
Attached is the file for your reference.
Please help me.
Thanks.
Dear friends,
In my excel sheet; I want to assign macro for form button; if I click this button, then I should get system time on the next column of the button.
Attached is the file for your reference.
Please help me.
Thanks.
[vba]
Sub Time()
With ActiveCell
.Value = Now
.NumberFormat = "h:mm AM/PM"
End With
End Sub
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Maybe ...
[VBA]
Sub Time()
ActiveSheet.Range("D4").Value = Format(Now, "hh:mm ampm")
End Sub
[/VBA]
Paul
Thanks;Originally Posted by Paul_Hossler
Its working.........
Thanks a lot..