Vampyre
New Member
- Joined
- Mar 23, 2011
- Messages
- 30
Ive ade a form in excel, which has mandatory fields , all of them seem to be working ok but the last one, it seems to over ride the rest.
Whilst the others seem to be dependant on the next questions or set of questions being answered, this one if you answer it, breaks all the rules.
This is the code im using
Private Sub CommandButton1_Click()
If Range("d11").Value = False Then
Cancel = True
MsgBox "Please Add Change Title "
End If
If Range("d13").Value = False Then
Cancel = True
MsgBox "Please Add Date Raised "
End If
If Range("d15").Value = False Then
Cancel = True
MsgBox "Please Add Name Of Requester "
End If
If Range("d19").Value = False Then
Cancel = True
MsgBox "Please Add Contact Number Of Requester "
End If
If Range("d21").Value = False Then
Cancel = True
MsgBox "Please Add Business Sponser "
End If
If Range("d23").Value = False Then
Cancel = True
MsgBox "Please Add Cost Centre "
End If
If Range("d25").Value = False Then
Cancel = True
MsgBox "Please Add Cost Centre Owner "
End If
If Range("d27").Value = False Then
Cancel = True
MsgBox "Please Add Description Of Change "
End If
If Range("e50").Value = False Then
Cancel = True
MsgBox "Please Add Impact Risk "
End If
If Range("e59").Value = False Then
Cancel = True
MsgBox "Please Add Training Requirements "
End If
If Range("d61").Value = False Then
Cancel = True
MsgBox "Please Add Details of Training Requirements "
End If
If Range("e75").Value = False Then
Cancel = True
MsgBox "Please Add MI Requirements "
End If
If Range("d77").Value = False Then
Cancel = True
MsgBox "Please Add Details Of MI Requirements "
End If
If Range("users").Value = False Then
Cancel = True
MsgBox "Please Add Details Of MI Requirements "
End If
If Range("Man").Value = False Then
Cancel = True
MsgBox "Please Complete Multiple Parts "
End If
If [Users].Value = "" Then
MsgBox "There MUST be an entry in Users !", vbOKOnly, "Entry Reqd"
[A1].Select
Cancel = True
End If
If Range("Man").Value = False Then
MsgBox "All sections of the report must be complete before submission", , "Data Incomplete"
Exit Sub
End If
ActiveWorkbook.SendMail Recipients:="e-mail addy", Subject:="New Change Request"
End Sub
anybody know why this would be ?? its driving me nuts
Whilst the others seem to be dependant on the next questions or set of questions being answered, this one if you answer it, breaks all the rules.
This is the code im using
Private Sub CommandButton1_Click()
If Range("d11").Value = False Then
Cancel = True
MsgBox "Please Add Change Title "
End If
If Range("d13").Value = False Then
Cancel = True
MsgBox "Please Add Date Raised "
End If
If Range("d15").Value = False Then
Cancel = True
MsgBox "Please Add Name Of Requester "
End If
If Range("d19").Value = False Then
Cancel = True
MsgBox "Please Add Contact Number Of Requester "
End If
If Range("d21").Value = False Then
Cancel = True
MsgBox "Please Add Business Sponser "
End If
If Range("d23").Value = False Then
Cancel = True
MsgBox "Please Add Cost Centre "
End If
If Range("d25").Value = False Then
Cancel = True
MsgBox "Please Add Cost Centre Owner "
End If
If Range("d27").Value = False Then
Cancel = True
MsgBox "Please Add Description Of Change "
End If
If Range("e50").Value = False Then
Cancel = True
MsgBox "Please Add Impact Risk "
End If
If Range("e59").Value = False Then
Cancel = True
MsgBox "Please Add Training Requirements "
End If
If Range("d61").Value = False Then
Cancel = True
MsgBox "Please Add Details of Training Requirements "
End If
If Range("e75").Value = False Then
Cancel = True
MsgBox "Please Add MI Requirements "
End If
If Range("d77").Value = False Then
Cancel = True
MsgBox "Please Add Details Of MI Requirements "
End If
If Range("users").Value = False Then
Cancel = True
MsgBox "Please Add Details Of MI Requirements "
End If
If Range("Man").Value = False Then
Cancel = True
MsgBox "Please Complete Multiple Parts "
End If
If [Users].Value = "" Then
MsgBox "There MUST be an entry in Users !", vbOKOnly, "Entry Reqd"
[A1].Select
Cancel = True
End If
If Range("Man").Value = False Then
MsgBox "All sections of the report must be complete before submission", , "Data Incomplete"
Exit Sub
End If
ActiveWorkbook.SendMail Recipients:="e-mail addy", Subject:="New Change Request"
End Sub
anybody know why this would be ?? its driving me nuts