If CheckBox is checked Then

  • I have Excel generate email through a macro. Added a check box on the spreadsheet and trying to make it so that when checked email is sent, if unchecked email displays.
    Getting Run-time error '424': Object required on line - If CheckBox5.Value = True Then - in below bit of code


    Code
    If CheckBox5.Value = True Then
        olMail.Send
    If CheckBox5.Value = False Then
        olMail.Display
    End If
    End If
  • This example shows where to include the code in your existing macro. The only part that you are concerned with is the IF CHECKBOX1 portion. In this scenario I used an ACTIVEX checkbox on the sheet (not the UserForm Checkbox control).


  • Compile error: Method or data member not found - while highlighting ".CheckBox5" portion - in my case it is #5

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!