PASTE SPECIAL

J

Jase

I have this code to submit a time stamp whenever a button is pushed but I
want it to paste Special so the time stays static and does not update with
each push of the button.

Sub TimeStamp()

Dim DestCell As Range

With Worksheets("Sheet")
Set DestCell = .Range("AU48")
End With

Do
If IsEmpty(DestCell.Value) Then
Exit Do
Else
Set DestCell = DestCell.Offset(0, 1)
End If
Loop

DestCell.Formula = "=TIME(HOUR(NOW()),MINUTE(NOW()),SECOND(NOW()))"
 
D

Dave Peterson

one way:
destcell.value = Time

or to keep your formula

with destcell
.Formula = "=TIME(HOUR(NOW()),MINUTE(NOW()),SECOND(NOW()))"
.value = .value
end with

And you can change the formula to one of the corrected versions in your previous
thread.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top