Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy time from one column to another in a macro
I am trying to create a simple worksheet to log people in / out + in/out when
going to lunch . I need help with code below. Computer asks me to ENTER or SELECT destination and press ENTER or choose PASTE. When I press ESC on keyboard the question goes away. Is there a way to tell VBA to press ESC to correct this problem? If there is a more simple way please advise. Column A - Name Column B - Where check goes to say person arrived Column C - Looks at Column B if checked (NOW()) Column D - Macro copies time from C and pastes as a value Column E - Repeat of B-D (for Out to Lunch, In from Lunch, Dep. for Day) Thanks for any help Robert Application.ScreenUpdating = False ActiveCell.FormulaR1C1 = "R" ActiveCell.Offset(0, 1).Select Selection.Copy ActiveCell.Offset(0, 1).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.OnKey "{ENTER}" Range("AZ1").Select ActiveCell.FormulaR1C1 = "=+TODAY()" Range("A1").Select ActiveCell.Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro for a one time triggered copy of cell value | Excel Discussion (Misc queries) | |||
copy cell with macro and increment down each time | Excel Worksheet Functions | |||
Copy rows multiple times changing value of a cell in one column each time | Excel Programming | |||
Best way to copy time sensitive data to a column | Excel Worksheet Functions | |||
Write a macro ro copy column at certain time of day. | Excel Programming |