How do I make a connection between an option button and a textbox in a userform?
How do I make a connection between an option button and a textbox in a userform?
I don't know what you mean by connection. If an optionbutton is clicked, then the value is true. Set the textbox1 value as you like for the click event.
Private Sub OptionButton1_Click() TextBox1.Value = "OptionButton1" End Sub Private Sub OptionButton2_Click() TextBox1.Value = "OptionButton2" End Sub
Thanks
I gave the most simple example possible. The code goes into the Userform object. What you do with it from there when you change code, I would have no idea why it would error. Either post the code or better yet, attach a sample workbook. To do that, click the Go Advanced button in lower right of a reply, and then click the paperclip icon on the toolbar to browse to your file.
The error should show where the problem is at. Sounds like you probably miss-typed a control name.
My bad. I had to edit my replay in the last moment before I got it to work.