I have the following code to prevent users from being able to save the form blank to send. However I need to be able to send the user a blank form innitially I can not figure out how to do this, Please advise.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If IsEmpty(ThisWorkbook.Sheets(1).Range("B6")) Then
MsgBox ("Must enter Supplier Name")
Cancel = True
Else
If IsEmpty(ThisWorkbook.Sheets(1).Range("C6")) Then
MsgBox ("Must enter Supplier Location")
Cancel = True
Else
If IsEmpty(ThisWorkbook.Sheets(1).Range("D6")) Then
MsgBox ("Please enter your 5 digit supplier code. If you need assistance with the supplier code please contact SSG at 1(800)782-8099")
Cancel = True
Else
If IsEmpty(ThisWorkbook.Sheets(1).Range("B10")) Then
MsgBox ("Please enter expected users First name")
Cancel = True
Else
If IsEmpty(ThisWorkbook.Sheets(1).Range("C10")) Then
MsgBox ("Please enter expected users Last name")
Cancel = True
Else
If IsEmpty(ThisWorkbook.Sheets(1).Range("D10")) Then
MsgBox ("Please Create an original SSO # for this user")
Cancel = True
Else
If IsEmpty(ThisWorkbook.Sheets(1).Range("F10")) Then
MsgBox ("Please enter expected users email address. Note: This must be a complete and existing email address")
Cancel = True
Else
If IsEmpty(ThisWorkbook.Sheets(1).Range("G10")) Then
MsgBox ("Please enter expected users full phone number with area code")
Cancel = True
End If
End If
End If
End If
End If
End If
End If
End If
End Sub
Bookmarks