A family of Microsoft word processing software products for creating web, email, and print documents.
You apparently are using and an auto_open macro to display your userform. Use and auto_new instead
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello All,
Attempting to learn vba through videos so please bear with me.
I was able to create a userform with multiple checkboxes for different scenarios. I am attempting to create or would like a msgbox to appear if checkbox 15 and checkbox 16 = false and the message to appear as "Appropriate disclosure was not selected. Please select correct disclosure in order to proceed."
How do I go about doing so? Please help.
Thank you in advance for your assistance.
A family of Microsoft word processing software products for creating web, email, and print documents.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
You apparently are using and an auto_open macro to display your userform. Use and auto_new instead
@ Doug Robbins and @ Greg Maxey
Thank you both for your help on this project. Both scenarios work perfectly. However, when I save the output document and open it, the userform dashboard also appears. The project is saved as a Word macro enable template.
How do I get rid of the dashboard or how do I save the output file as a regular Word document so that the dashboard does not come up again?
Thank you again in advance for your assistance.
Personally, I like to have my "execute" button disabled until all conditions are met. I would set the default of my command button .enabled property to "false" then use something like:
Private Sub CheckBox15_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Validate
End Sub
Private Sub CheckBox16_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Validate
End Sub
Private Sub SomeSubsequentControl_Enter()
Validate
End Sub
Sub Validate()
If Not CheckBox15 And Not CheckBox16 Then
MsgBox "Your message"
CommandButton1.Enabled = False
Else
CommandButton1.Enabled = True
End If
End Sub
Use the following code in the Exit event for Checkbox16
If Checkbox16 = False then
If Checkbox15) =False then
Msgbox "Both checkboxes as False
End If
End If