mardi 28 mai 2019

When I open the Excel it runs the macro and change the date saved

Am doing a macro in a check box (Form Control), the main idea is when I check the check box in the next cell it saves the date of the day I marked the checkbox. But instead if I save the check box with the mark it gets updated when I open the document. erasing the saved date and updating today's date.

I've tried 2 ifs and Errors GoTo Err and doesn't work

this is the code I have: If ActiveSheet.Shapes("Check Box 2").ControlFormat.Value = 1 Then

cells(6, 5).Value = Date

Else

Range("E6").ClearContents

End If

I need to put some code that stops the actualization. Or it tells the macro that when the check box is mark doesn't have to update the date.




Aucun commentaire:

Enregistrer un commentaire