I have the Msgbox set in my Excel sheet b the following code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("D32").Value > 12 And Range("D32").Value < 25 Then
VBA.MsgBox "Remember to double up on cable lengths and DP's", , "THP Between 13 & 24"
End If
End Sub
it works, but pop-ups every time when I clik on any other cell in my worksheet.
I tried to sort this out by using this thread:
and my code was looking like this:
If Range("D32").Value > 12 And Range("D32").Value < 25 Then
If MsgBox("Remember to double up on cable lengths and DP's", , "THP Between 13 & 24") Then
Application.Undo
End If
End If
but it didn't work.
I found also other solutions here:
http://www.vbaexpress.com/forum/showthread.php?35907-Solved-display-msgbox-once
https://www.mrexcel.com/board/threads/vba-to-display-msgbox-only-once.806009/
stackoverflow.com/questions/49072954/vba-msgbox-show-only-once
but they weren't helpful.
Is there any way to make it work? I would like to have this msgbox appear just once.