Hi All,
Little trouble getting my combobox to take focus after its frame is set to visible=true. I have some code that is suppose to change the visibility state of "Frame_Muscles" based on check listboxbox selections. If Frame_Muscles is visible, I want the focus to go directly to the combobox "cbmusclegroup"
Code snippet here:
I have tried a variety code bits to try and get the focus on "cbmusclegroup" which is a combobox within Frame_Muscles. All have failed up to this point. After the last If statement in the code, I have tried "Frame_Muscles.repaint" and "cbmusclegroup.setfocus" to get the frame visible under the correct conditions and the cursor focused before the sub exit.
Any help is appreciated,
Patrick
Little trouble getting my combobox to take focus after its frame is set to visible=true. I have some code that is suppose to change the visibility state of "Frame_Muscles" based on check listboxbox selections. If Frame_Muscles is visible, I want the focus to go directly to the combobox "cbmusclegroup"
Code snippet here:
Code:
Private Sub Frame_Mode_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim i As Long
Frame_Muscles.Visible = False
Frame_Screw.Visible = False
For i = 4 To 16
If ListBox2.Selected(i) Then Frame_Muscles.Visible = True
Next i
If ListBox2.Selected(14) Then Frame_Screw.Visible = True
End Sub
I have tried a variety code bits to try and get the focus on "cbmusclegroup" which is a combobox within Frame_Muscles. All have failed up to this point. After the last If statement in the code, I have tried "Frame_Muscles.repaint" and "cbmusclegroup.setfocus" to get the frame visible under the correct conditions and the cursor focused before the sub exit.
Any help is appreciated,
Patrick