What is the syntax to see if a checkbox is checked?

 <userform name>.<checkbox name>.Value
'example
If formHome.chkActiveOnly.Value = True Then
    MsgBox "User has checked the box"
Else
    MsgBox "User has not checked the box"
End If

 

Advertisements

What is the syntax to check the value of a textbox?

If <textbox name>.Value = "<value textbox should be>" Then
   <code to be run, provided correct textbox value was entered>
End If
'example
If txtName.Value = "" Then
     Msgbox ("No name was entered!")
End If