hendyhellen
New Member
- Joined
- Jul 29, 2023
- Messages
- 19
- Office Version
- 2019
- Platform
- Windows
- MacOS
Hello all,
How to make the cursor always focus on the textbox after user pressing enter on textbox ?
Using this code, the cursor not focus on textbox after input and pressing enter
Thank you all~
How to make the cursor always focus on the textbox after user pressing enter on textbox ?
Using this code, the cursor not focus on textbox after input and pressing enter
VBA Code:
Private Sub TextBox1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
If Len(TextBox1.Text) <> 0 Then
Product = UCase(TextBox1.Value)
Call Print_Label
Me.TextBox1.Text = vbNullString
Me.TextBox1.SetFocus
Cancel = True
End If
End Sub
Thank you all~