How to access UserForm radio button Caption
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2017
05:15 PM
12-24-2017
05:15 PM
How to access UserForm radio button Caption
I have a UserForm that I display from JavaScript
var userForm = UserForms.StartupForm; var formResult = userForm.ShowModal();
The UserForm contains a RadioGroup with several radio buttons on it. How do I fetch the Caption property of the selected radio button?
Solved! Go to Solution.
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2017
12:52 AM
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2017
11:06 AM
12-28-2017
11:06 AM
Many thanks to Evgeny in tech support for this solution:
// In this example, a form named MyForm contains a radio button group
// named radioGroup.
// Display a modal form var frm = UserForms.MyForm; var modalResult = frm.ShowModal(); // Get the selected radio button var idx = frm.radioGroup.ItemIndex; var rb = frm.radioGroup.ChildControl(idx); // Access properties on the radio button control var selectedCaption = rb.Caption;
Note that code completion doesn't display any properties or methods for the radio button object.
