ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   LOCK TIME (https://www.excelbanter.com/excel-discussion-misc-queries/26002-lock-time.html)

confused

LOCK TIME
 
HIYA
how can i lock the time in a cell when using the now function

am developing a vehicle log , and nned it to recored the time a vehicle
arives on site based on when a action is performed

example being
if a2 is activeated then b2 = time
if a3 is activated then b3 = time
ect,

the problem im having is that by using the now function all the times change
to the last entry time instead of leaving the previous times as they were


Gary's Student

Once a cell has the correct time you need to replace the function by it
value, then it is frozen:

select the cell
Edit/Copy
on the same cell
Edit/Paste Special/Value
--
Gary's Student


"confused" wrote:

HIYA
how can i lock the time in a cell when using the now function

am developing a vehicle log , and nned it to recored the time a vehicle
arives on site based on when a action is performed

example being
if a2 is activeated then b2 = time
if a3 is activated then b3 = time
ect,

the problem im having is that by using the now function all the times change
to the last entry time instead of leaving the previous times as they were


Bob Phillips

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:A100")) Is Nothing Then
With Target
.Offset(0, 1).Value = Format(Time, "hh:mm:ss")
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.




--

HTH

RP
(remove nothere from the email address if mailing direct)


"confused" wrote in message
...
HIYA
how can i lock the time in a cell when using the now function

am developing a vehicle log , and nned it to recored the time a vehicle
arives on site based on when a action is performed

example being
if a2 is activeated then b2 = time
if a3 is activated then b3 = time
ect,

the problem im having is that by using the now function all the times

change
to the last entry time instead of leaving the previous times as they were




confused

thanks for you answer, but what im looking for is a way for excell to auto
"paste special" the cell so it does not change. the form is intended to be
used by anyone with only on click

"Gary's Student" wrote:

Once a cell has the correct time you need to replace the function by it
value, then it is frozen:

select the cell
Edit/Copy
on the same cell
Edit/Paste Special/Value
--
Gary's Student


"confused" wrote:

HIYA
how can i lock the time in a cell when using the now function

am developing a vehicle log , and nned it to recored the time a vehicle
arives on site based on when a action is performed

example being
if a2 is activeated then b2 = time
if a3 is activated then b3 = time
ect,

the problem im having is that by using the now function all the times change
to the last entry time instead of leaving the previous times as they were


Bob Phillips

see my response

--

HTH

RP
(remove nothere from the email address if mailing direct)


"confused" wrote in message
...
thanks for you answer, but what im looking for is a way for excell to auto
"paste special" the cell so it does not change. the form is intended to be
used by anyone with only on click

"Gary's Student" wrote:

Once a cell has the correct time you need to replace the function by it
value, then it is frozen:

select the cell
Edit/Copy
on the same cell
Edit/Paste Special/Value
--
Gary's Student


"confused" wrote:

HIYA
how can i lock the time in a cell when using the now function

am developing a vehicle log , and nned it to recored the time a

vehicle
arives on site based on when a action is performed

example being
if a2 is activeated then b2 = time
if a3 is activated then b3 = time
ect,

the problem im having is that by using the now function all the times

change
to the last entry time instead of leaving the previous times as they

were





All times are GMT +1. The time now is 03:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com