Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro
Hi,
I need time sheet macro. Suppose one user starts his work @ 8 , Here is what I need ( Step by step) 1. before user starts working need to click the button, in just single click on the button time will be appeared in A10 cell. (e.g., 06:16:00 AM) 2. Once the user completes the work and then user click's the button in B10 end time will be showed (E.g., 06:20:00 AM) 3. Start and end time difference need to appear on A9 cell. Can u please input solution. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro
muddan madhu, This is what I came up with for you to try: Format the cells (A9, A10, &B10) with the Format, Cell, Time with the proper format. Put a Command button on the worksheet, Command1 Place a second Command button on the worksheet, Command2 On the worksheet select "Design Mode" icon. Select the first button, right click, select "Properties" On the "Alphabetic" tab, change the CAPTION entry from CommandButton1 to "START". Change the PrintObject entry to "False" so the button will not print. Select the first button again, right click, select "View Code" Underneath the line "Private Sub CommandButton1_Click() type: "Range("A10").Select ActiveCell.FormulaR1C1 = Now()" without the "" Select the second button, right click, select "Properties" On the "Alphabetic" tab, change the CAPTION entry from CommandButton2 to "END". Change the PrintObject entry to "False" so the button will not print. Select the second button again, right click, select "View Code" Underneath the line "Private Sub CommandButton2_Click() type: "Range("B10").Select ActiveCell.FormulaR1C1 = Now() Range("A9").Select ActiveCell.FormulaR1C1 = Range("B10") - Range("A10") Range("A9").Select ActiveCell.NumberFormat = "h:mm:ss"" Leaving off the first " and the last ". hth "muddan madhu" wrote: Hi, I need time sheet macro. Suppose one user starts his work @ 8 , Here is what I need ( Step by step) 1. before user starts working need to click the button, in just single click on the button time will be appeared in A10 cell. (e.g., 06:16:00 AM) 2. Once the user completes the work and then user click's the button in B10 end time will be showed (E.g., 06:20:00 AM) 3. Start and end time difference need to appear on A9 cell. Can u please input solution. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |