Hey.
I have in a userform mutliple optionbuttons that, when the keydown event is called they all should do the same thing.
for example
and thats what should happen for optbt1-8
is there a way to generalize this code?
i thought about using a class but then i would have the problem that the name of each optbt is different..
any ideas?
I have in a userform mutliple optionbuttons that, when the keydown event is called they all should do the same thing.
for example
VBA Code:
Private Sub optbt1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
'KeyCode 9=Tab 13=Enter
If KeyCode = 13 Then
me.optbt1 = True
Me.Frame2.SetFocus
End If
End Sub
and thats what should happen for optbt1-8
is there a way to generalize this code?
i thought about using a class but then i would have the problem that the name of each optbt is different..
any ideas?