Auto input time ??

Cruizer67

New Member
Joined
Jan 17, 2005
Messages
31
How do I get excel to auto input the time (timestamp) every time a user form is ran.. This is for clock in and clock out of production job. I tried

ws.Cells(iRow, 7).Value = "=Now()"

The cell is set for time format.. but when the macro is ran I get ####### in the cell.. when I check the time format and m ake it right it shows the current time as right now.. not when the button was pushed..

any help???

Bernard
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Welcome to MrExcel -- you want to put in a static time, not a formula --

ws.Cells(iRow, 7).Value = Time

Format as desired.

BTW - #### signifies that the column width is insufficient for the current value - try widening the column, or re-formatting the data.
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,385
Members
448,956
Latest member
JPav

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top