I have a Userform with several Textboxes and two Command Buttons.
Tab Indexes are set and will tab through the Textboxes from start to finish,
My problem is, I need to be able to click CommandButton1 (NEW) and execute the sub assigned to that button while the cursor is tabbing thru the Textboxes.
Currently it seems whatever Textbox the cursor is at just ignores the CommandButton press (maybe the Textbox considers the button press a Textbox entry?)
Is there a way to set the CommandButton priority so that it takes precedence over a Textbox entry?
Does this make sense LOL??
Typical Textbox code:
CommandButton code:
Tab Indexes are set and will tab through the Textboxes from start to finish,
My problem is, I need to be able to click CommandButton1 (NEW) and execute the sub assigned to that button while the cursor is tabbing thru the Textboxes.
Currently it seems whatever Textbox the cursor is at just ignores the CommandButton press (maybe the Textbox considers the button press a Textbox entry?)
Is there a way to set the CommandButton priority so that it takes precedence over a Textbox entry?
Does this make sense LOL??
Typical Textbox code:
VBA Code:
Private Sub TextBox1_AfterUpdate ()
Execute code
End Sub
CommandButton code:
Code:
Private Sub CommandButton1_Click()
Execute code
End Sub