Hello!
I have an option button collection which monitors changes. When a new option button is selected, I want to pass the .Caption of that button into a userform update.
Ultimately, the code in question ends up looking like this:
This sub is in Module2, and I have updateButton(caption As String) located within the UserForm1 code.
At this point it works just fine, but when I move the above code from Module2 to Module1, I start getting a compile error, and the "Auto List Members" functionality stops working.
It is almost like Excel can't find UserForm1 from within Module1.
Does anyone have any idea why this is happening?
Thanks!
I have an option button collection which monitors changes. When a new option button is selected, I want to pass the .Caption of that button into a userform update.
Ultimately, the code in question ends up looking like this:
Code:
Sub Update(caption As String)
UserForm1.updateButton(caption)
End Sub
This sub is in Module2, and I have updateButton(caption As String) located within the UserForm1 code.
At this point it works just fine, but when I move the above code from Module2 to Module1, I start getting a compile error, and the "Auto List Members" functionality stops working.
It is almost like Excel can't find UserForm1 from within Module1.
Does anyone have any idea why this is happening?
Thanks!
Last edited: