Despite hours of searching and trying loads of different ways to resolve I have finally accepted its time to ask for help,
So my question is how do I write the exit sub to include the 2nd bit of code pasted below?
Many thanks for any advice or solutions offered. Paul
So my question is how do I write the exit sub to include the 2nd bit of code pasted below?
Many thanks for any advice or solutions offered. Paul
VBA Code:
Private Sub Textbox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim Result As VbMsgBoxResult
If ckBTextbox1.Value = True And Trim(Textbox1.Value) = "" Then
Textbox1.BackColor = RGB(255, 0, 0)
Result = MsgBox("You've ticked this box but not entered the a name." & vbCrLf & vbCrLf & _
"Click 'Yes' to enter the name or 'No' to un-tick.", vbInformation + vbYesNo, "Name Required:")
If Result = vbYes Then
Cancel = True
Textbox1.BackColor = RGB(204, 255, 255)
Else
ckBTextbox1.Value = False
Textbox1.BackColor = RGB(255, 255, 255)
Textbox1Desc.Enabled = False
End If
End If
End If
End Sub
VBA Code:
If ckBTextbox1.Value = True And Textbox1.Value > "" Then
Textbox1Desc.SetFocus
Textbox1Desc.BackColor = RGB(204, 255, 255)
End If