Greetings,
What is the code i need to use to assign a macro to a command button which inserts the current date and time in the selected cell regardless of where that cell is?
Much obliged.
Last edited by TheRetroChief; 10-20-2009 at 08:13 AM.
Code:Sub Macro6() ' ' Macro6 Macro ' With ActiveCell .NumberFormat = "[$-409]m/d/yy h:mm AM/PM;@" .Value = Now() .ColumnWidth = 15# End With End Sub
Last edited by radar_jynx; 10-20-2009 at 07:13 AM.
Just edited, had a typo try that. You may need to increase the column width.
Hi,
One way:
HTHCode:ActiveCell = Format(Date, "dd/mm/yyyy") & " : " & Time
Richard Buttrey
If this was useful then please rate it appropriately.
Click the small star iconat the bottom left of my post.
hi buddy,
find the attachment it will be fix ur pblm
regards,
Prabath.N
As always, you guys have sorted me right out.
Ta muchly.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks