Hello: I'm creating a template in which all cells must be filled out before a macro can be run. The current coding I have creates a message box anytime I click on a cell and the required cells have not been filled in. I would like for the message box only to appear after the template has been filled out so it will reveal anything the employee may have forgot to input. I tried disabling events and then re enabling them at the end but that didnt really work so Im hoping someone has ideas.
Code
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Application.EnableEvents = False
- If Range("b1") = "" Then
- MsgBox "Must input Name before continuing"
- ElseIf Range("b2") = "" Then
- MsgBox "Must input Strength before continuing"
- ElseIf Range("b3") = "" Then
- MsgBox "Must input if Preservative Free before continuing"
- ElseIf Range("b4") = "" Then
- MsgBox "Must input Units Requested before continuing"
- ElseIf Range("b5") = "" Then
- MsgBox "Must input Packaging before continuing"
- ElseIf Range("c5") = "" Then
- MsgBox "Must input Unit of Measurement before continuing"
- ElseIf Range("d5") = "" Then
- MsgBox "Must input Container Type before continuing"
- ElseIf Range("b6") = "" Then
- MsgBox "Must input Projected Use before continuing"
- ElseIf Range("b7") = "" Then
- MsgBox "Must input Route of Admin before continuing"
- ElseIf Range("b8") = "" Then
- MsgBox "Must input Customer Type before continuing"
- ElseIf Range("b9") = "" Then
- MsgBox "Must input Current Price before continuing"
- End If
- Application.EnableEvents = True
- End Sub