Hi,
I am a beginner with VBA codes, and I am working with the script below. Basically I have the D17:D36 range set as "No" responses. If a user selects "Yes" for more than one of the cells, then I want the message box to show up. The message box is working as it shows up, but I have to click "OK" twice to clear the message box. Is there a way to make it pop up only once? Alternatively, is there a way to automatically close the message box after 2 seconds?
Private Sub Worksheet_Calculate()
If Application.WorksheetFunction.CountIf(Range("D17:D36"), "Yes") > 1 Then
MsgBox "Please submit a separate request form for each request.", vbOKOnly, "Multiple Requests"
End If
End Sub
Thanks,
Hau
I am a beginner with VBA codes, and I am working with the script below. Basically I have the D17:D36 range set as "No" responses. If a user selects "Yes" for more than one of the cells, then I want the message box to show up. The message box is working as it shows up, but I have to click "OK" twice to clear the message box. Is there a way to make it pop up only once? Alternatively, is there a way to automatically close the message box after 2 seconds?
Private Sub Worksheet_Calculate()
If Application.WorksheetFunction.CountIf(Range("D17:D36"), "Yes") > 1 Then
MsgBox "Please submit a separate request form for each request.", vbOKOnly, "Multiple Requests"
End If
End Sub
Thanks,
Hau