Richard U
Active Member
- Joined
- Feb 14, 2006
- Messages
- 406
- Office Version
- 365
- 2016
- 2010
- 2007
- Platform
- Windows
This message
https://www.mrexcel.com/forum/excel-questions/726568-frame-control-activex-option-button.html
Showed me how to add the buttons to a frame, which I did easily,
What I don't know is how to access the controls on the frame when they are clicked.
I experimented and can address them like this
<code>
Private Sub frm_SearchBy_Click()
Me.frm_SearchBy.Controls("txt_Item").Text = "Hello"
End Sub
</code>
which will change the value in the textbox, but I also have option buttons and command buttons which I want to have trigger events when they are clicked on, which I cannot seem to be able to do.
Any ideas?
https://www.mrexcel.com/forum/excel-questions/726568-frame-control-activex-option-button.html
Showed me how to add the buttons to a frame, which I did easily,
What I don't know is how to access the controls on the frame when they are clicked.
I experimented and can address them like this
<code>
Private Sub frm_SearchBy_Click()
Me.frm_SearchBy.Controls("txt_Item").Text = "Hello"
End Sub
</code>
which will change the value in the textbox, but I also have option buttons and command buttons which I want to have trigger events when they are clicked on, which I cannot seem to be able to do.
Any ideas?