Hi thanks for helping me!

I made rows mandatory before closing but when I'm testing and I input data into the rows that are mandatory the message box still pops up and does not allow me to save the document. I need a little help.

This is the code:


If Worksheets("Sheet").Range("A6") = True Then
If Worksheets("Sheet").Range("G7").Value = "" Or _
Worksheets("Sheet").Range("G9").Value = "" Or _
Worksheets("Sheet").Range("G11").Value = "" Or _
Worksheets("Sheet").Range("G13").Value = "" Or _
Worksheets("Sheet").Range("G15").Value = "" Then
MsgBox "Please fill out these required fields on Sheet tab that are highlighted in blue."
Cancel = False
Exit Sub
End If
End If


If Worksheets("Sheet").Range("A19") = True Then
If Worksheets("Sheet").Range("G20").Value = "" Or _
Worksheets("Sheet").Range("G22").Value = "" Or _
Worksheets("Sheet").Range("G24").Value = "" Or _
Worksheets("Sheet").Range("G26").Value = "" Then
MsgBox "Please fill out these required fields on Sheet tab that are highlighted in blue."
Cancel = True
Exit Sub
End If
End If

If Worksheets("Sheet").Range("A29") = True Then
If Worksheets("Sheet").Range("G30").Value = "" Or _
Worksheets("Sheet").Range("G32").Value = "" Or _
Worksheets("Sheet").Range("G34").Value = "" Then
MsgBox "Please fill out these required fields on Sheet tab that are highlighted in blue."
Cancel = True
Exit Sub
End If
End If

If Worksheets("Sheet").Range("A40") = True Then
If Worksheets("Sheet").Range("G41").Value = "" Or _
Worksheets("Sheet").Range("G43").Value = "" Then
MsgBox "Please fill out these required fields on Sheet tab that are highlighted in blue."
Cancel = True
Exit Sub
End If
End If

If Worksheets("Sheet").Range("A46") = True Then
If Worksheets("Sheet").Range("G47").Value = "" Or _
Worksheets("Sheet").Range("G29").Value = "" Then
MsgBox "Please fill out these required fields on Sheet tab that are highlighted in blue."
Cancel = True
Exit Sub
End If
End If

End Sub