Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CheckBox in userform
I'm building a UserForm that has CheckBoxes (called say CB1). The code that
I want to inclued is when CB1 is chcked do this else do that. My start off bub looks klike this.... but it doesn't work!!!! Private Sub Bouton_print_Click() If CB1.Value = True Then '.... do this Else '.... do that End If End Sub Reagrds, MD |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
CheckBox in userform
Hi MD
This is working for me with a button with the name "CommandButton1" and a checkbox with the name "Cb1" Private Sub CommandButton1_Click() If Me.Cb1.Value = True Then MsgBox ".... do this" Else MsgBox ".... do that" End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "MD" wrote in message ... I'm building a UserForm that has CheckBoxes (called say CB1). The code that I want to inclued is when CB1 is chcked do this else do that. My start off bub looks klike this.... but it doesn't work!!!! Private Sub Bouton_print_Click() If CB1.Value = True Then '.... do this Else '.... do that End If End Sub Reagrds, MD |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
CheckBox in userform
Are you sure the button is called Bouton_print?
This is a simpler version of your code that works Private Sub Bouton_print_Click() MsgBox IIf(CB1, "Do this", "Do that") End Sub -- HTH RP (remove nothere from the email address if mailing direct) "MD" wrote in message ... I'm building a UserForm that has CheckBoxes (called say CB1). The code that I want to inclued is when CB1 is chcked do this else do that. My start off bub looks klike this.... but it doesn't work!!!! Private Sub Bouton_print_Click() If CB1.Value = True Then '.... do this Else '.... do that End If End Sub Reagrds, MD |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CheckBox on UserForm | Excel Programming | |||
userform CheckBox print | Excel Programming | |||
userform CheckBox print | Excel Programming | |||
Userform and checkbox.... | Excel Programming | |||
Conditional Checkbox Creation on a UserForm | Excel Programming |