G
Guest
I’m trying to build a form with build in buttons that will send and close the
form. They have to send the form to a predetermined e-mail and also have to
attend some requirement as the true value of an control. I have written some
codes in vba but they don’t work at all. The thing is that looks like the
buttons is not even linked to the code I wrote, I press it and nothing at all
happened. Here is an example;
My button to this code is named: enviardiretoria
Private Sub enviardiretoria_Click()
If CheckBox1 = True Then
Item.To = "(e-mail address removed)"
Item.Send
End If
If checkbox2 = True Then
Item.To = TextBox21
Item.Send
End If
Close
End Sub
Please help me, thanks in advance
form. They have to send the form to a predetermined e-mail and also have to
attend some requirement as the true value of an control. I have written some
codes in vba but they don’t work at all. The thing is that looks like the
buttons is not even linked to the code I wrote, I press it and nothing at all
happened. Here is an example;
My button to this code is named: enviardiretoria
Private Sub enviardiretoria_Click()
If CheckBox1 = True Then
Item.To = "(e-mail address removed)"
Item.Send
End If
If checkbox2 = True Then
Item.To = TextBox21
Item.Send
End If
Close
End Sub
Please help me, thanks in advance