PASTE SPECIAL
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()) )" |
PASTE SPECIAL
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. Jase wrote: 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()) )" -- Dave Peterson |
All times are GMT +1. The time now is 06:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com