Hi folks,
Let me first thank you for reading.
What I would like to do in my userform is to store a group of optionbutton's into an array, so whenever I need to iterate through all the optionbutton's I can just use a FOR loop and quickly get the object reference.
Suppose I declared the following:
Type myType
xInt as integer
xOption as OptionButton
end type
...
Dim xOptions(1 to 5) as myType
Whenever I do
xOptions(1).xOption = UserForm1.OptionButton1
I get a runtime error, because it seems to always go after the default property of OptionButton, which means it's trying to assign OptionButton1.Value into xOption. How do I assign the OBJECT OptionButton1 into xOption? I couldn't find CASTING, or methods that returns the object...and of course I have similar wishes for labels/textbox/...etc.
FYI: OptionButton1 was created using the Form-GUI
Thanks again.
Bookmarks