Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
When I tried recording such a macro, the "Stop Recording Macro" command was
not available until after confirming/entering the contents of the cell. The macro did not record the "Ctrl + :" or the "Ctrl + Shift + ;", but rather just entered the date, space, and time into the macro itself. Running the macro subsequently just entered the date and time when the macro was created. I went in and looked at the macro's code, and it looks like this: Sub DateTimeStamp() ' ' DateTimeStamp Macro ' Macro recorded 04/24/2007 by Steve Vincent ' ' ActiveCell.FormulaR1C1 = "4/24/2007 13:55" Application.Goto Reference:="DateTimeStamp" End Sub Any suggestions of another method? "D ][/][ C" wrote: abe Wrote: We have a worksheet that we want users to be able to press a button on the worksheet & which in the next cell near the button, it would stamp the current time and/or date from the system. Then the cell with the date and/or time would be unable to be changed once the button is pressed (locked) You can shopw the current date and time with a macro assigned to a button to do what you intend. Firstly select the cell you intend using and set the date format you want to use. Then as you start recording your macro with the cell still selected press(CTRL+; then SPACE then CTRL+SHIFT+; ) to set the systems current date & time, press stop on the recording toolbar. Now select the button you intend to use from the (View,Toolbars, Forms) menu. A list including the macro you just created will appear, assign this macro to the button. Change the text of the button to whatever the user will understand -- D ][\/][ C |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I input email addresses in Excel without the hyperlink, | Excel Discussion (Misc queries) | |||
how do i get excel to stop changing my input 5-9 to 9-May???? | Excel Discussion (Misc queries) | |||
How Do I open an excel file without Excel Viewer support | Excel Discussion (Misc queries) | |||
sharing/using/saving Excel 2002 files in Excel 2003 | Excel Discussion (Misc queries) | |||
How do I setup a spin button in excel | Excel Discussion (Misc queries) |