Hi All,
i am creating some error checking on a template of mine and i need to have a code that runs a bunch of if statements and exits if it doesnt meet the criteria at any step of the process, and the end result if it passes all criteria is 'msgbox go' but i cant seem to get it right
- excel 2007
Sheets("USERPAGE").Activate
If IsEmpty(Sheets("USERPAGE").Range("D74").Value) = False Then
If Sheets("USERPAGE").Range("F74") = vbNullString Then
MsgBox ("Please check Min Nights - Min Nights mandatory when using FOC")
Exit Sub
Else
If IsEmpty(Sheets("USERPAGE").Range("B71").Value) = True Then
MsgBox ("Please check product code - Mandatory")
Exit Sub
Else
If IsEmpty(Sheets("USERPAGE").Range("C71").Value) = True Then
MsgBox ("Please check City Code - Mandatory")
Exit Sub
Else
If IsEmpty(Sheets("USERPAGE").Range("J71").Value) = True Then
MsgBox ("Please check child ages - Mandatory")
Exit Sub
Else
If IsEmpty(Sheets("USERPAGE").Range("L71").Value) = True Then
MsgBox ("Please check infant age - Mandatory")
Exit Sub
Else
If IsEmpty(Sheets("USERPAGE").Range("D75").Value) = False Then
If Sheets("USERPAGE").Range("F75") = vbNullString Then
MsgBox ("Fraction required when Part-day Checkout used")
Exit Sub
Else
MsgBox ("go")
End If
Bookmarks