![]() |
Select the highest Date/Time stamp in a column, Show it in a MsgBoxand delete those after confirmation
Hello,
I'd like to create the following code; In a sheet in column X in several records a date/time stamp is registered like "02/09/2017 / 08:40:27". The registration of this datafield was a result that came from a code; For Each cel In Range(Replace$(wrk, "A", "X")).Cells cel.Value = DateValue(Now) & " / " & TimeValue(Now) timestamp = DateValue(Now) & " / " & TimeValue(Now) De code should look which date/time is the latest in this column, then shows a popupmessage box showing this latest date/time stamp and how many records have this, like: MsgBox: Latest stamp = "02/09/2017 / 08:40:27", Registered "12" times. Will you delete this latest stamp in those fields Yes of Cancel. This MsgBox should have action option buttons: Cancel = Close action, do nothing. Oke = Delete this latest date/time stamp in all the records were this is registered in column X. When clicking Oke, the datafields with the latest date/time stamp are empty. Can somebody please help me out with this. regards, Johan |
All times are GMT +1. The time now is 08:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com