D
Doug
I am working on a form for our salesmen. I have a series of checkboxes that
are available and when one is checked on or enabled the others are disabled.
What I want to do with two of these when the salesman tries to save the form
is have it check for these two checkboxes to see if one is on/enabled and if
so then check a cell to make sure it has been filled out. If not then you get
a message asking you to fill in the requirement. The code is on ThisWorkbook,
I would appreciate any help.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
'In the "Enclosure" section of the form, looks at checkboxes for Sound
Attenuated, Super Sound Attenuated, and cell H33. If one is checked on and
H33 is blank then don't allow Save.
If cbSA.Enabled = True And Range("H33").Value = "" Then
Cancel = True
If cbSSA.Enabled = True And Range("H33").Value = "" Then
Canel = True
MsgBox("You have not specified a sound attenuation requirement.") &
("This sheet will not be saved until you furnish this information" vbOKOnly)
If a = vbOKOnly Then Cancel = True
End If
End If
End Sub
are available and when one is checked on or enabled the others are disabled.
What I want to do with two of these when the salesman tries to save the form
is have it check for these two checkboxes to see if one is on/enabled and if
so then check a cell to make sure it has been filled out. If not then you get
a message asking you to fill in the requirement. The code is on ThisWorkbook,
I would appreciate any help.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
'In the "Enclosure" section of the form, looks at checkboxes for Sound
Attenuated, Super Sound Attenuated, and cell H33. If one is checked on and
H33 is blank then don't allow Save.
If cbSA.Enabled = True And Range("H33").Value = "" Then
Cancel = True
If cbSSA.Enabled = True And Range("H33").Value = "" Then
Canel = True
MsgBox("You have not specified a sound attenuation requirement.") &
("This sheet will not be saved until you furnish this information" vbOKOnly)
If a = vbOKOnly Then Cancel = True
End If
End If
End Sub