Hi Roy,
Thanks for the suggestion, I managed to use the worksheetfunction "AND" to allow the elseif to continue.
Option Explicit
Sub VALIDATEINPUT()
Dim RngCell As Range
If Range("EMP") = "" Then
MsgBox ("You must enter an employee number at the top")
ElseIf Range("EDATE") = "" Then
MsgBox ("You must enter the date the change is effective from using the date picker at the top")
ElseIf Range("REQ") = "" Then
MsgBox ("You must select the request for the change")
ElseIf Range("REQ") <> "Other - please specify" Then
GoTo 1
ElseIf Range("REQO") = "" Then
MsgBox ("You must enter the request in the 'other request' box")
Else: GoTo 1
1: If Range("RES") = "" Then
MsgBox ("You must select a reason for the change request")
ElseIf Range("RES") <> "Other - please specify" Then
GoTo 2
ElseIf Range("RESO") = "" Then
MsgBox ("You must enter a reason in the 'other reason' box")
Else: GoTo 2
2: If Range("REQD") = "" Then
MsgBox ("You must detail the nature of the change request in the 'details of request' box")
Else: GoTo 3
3: If WorksheetFunction.And(Range("PPT") = "", Range("PSC") = "") Then
GoTo 4
ElseIf WorksheetFunction.And(Range("PPT") <> "", Range("PSC") <> "") Then
GoTo 4
ElseIf WorksheetFunction.And(Range("PPT") = "", Range("PSC") <> "") Then
MsgBox ("You must select a scale point")
ElseIf WorksheetFunction.And(Range("PPT") <> "", Range("PSC") = "") Then
MsgBox ("You must select a salary scale first")
Range("PPT") = ""
4: If WorksheetFunction.And(Range("CDESC") = "YES", Range("PDESC") <> "") Then
GoTo 5
ElseIf WorksheetFunction.And(Range("CDESC") <> "YES", Range("PDESC") = "") Then
GoTo 5
ElseIf WorksheetFunction.And(Range("CDESC") = "YES", Range("PDESC") = "") Then
MsgBox ("You must upload a job description")
ElseIf WorksheetFunction.And(Range("CDESC") <> "YES", Range("PDESC") <> "") Then
Range("CDESC") = "YES"
5: If Range("MANG") = "" Then
MsgBox ("Please enter your employee number in the orange box")
Sheets(2).CommandButton4.Visible = True
ElseIf Sheets(2).CheckBox1.Value = 0 Then
MsgBox ("Please tick the checkbox to confirm you wish to make this request")
Else
ActiveSheet.Unprotect Password:="TMC"
Call Module4.AutoComp
Sheets(2).CommandButton4.Visible = False
For Each RngCell In Range("ingrp").Cells
RngCell.Locked = True
Next RngCell
ActiveSheet.Protect Password:="TMC"
End If
End If
End If
End If
End If
End If
End Sub
Bookmarks