If a user tabs off of cell A1 to another cell and cell A1 is blank, is there a way to make a box appear that says A1 can't be blank? I have 3 cells that are required on a template that I need this to happen in. Thanks for any help.
If a user tabs off of cell A1 to another cell and cell A1 is blank, is there a way to make a box appear that says A1 can't be blank? I have 3 cells that are required on a template that I need this to happen in. Thanks for any help.
Try the SelectionChange event for the worksheet.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address <> "$A$1" Then
If Sheet1.Cells(1, 1).Value = "" Then
MsgBox "Cell A1 cannot be blank!"
Sheet1.Cells(1, 1).Activate
End If
End If
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks