Forcing the cursor

B

B Wassen

Hello,

In a form I like to force the cursor to start in textbox1 because when I
open the form now it starts with the cursor in textbox2.

Private Sub CommandButton3_Click()

On Error Resume Next
FormWijzigen TextBox1.SetFocus
With Sheets("Data").Range("B:B").Find(TextBox1.Value,
LookIn:=xlValues)

TextBox2.Value = .Offset(0, -1).Value
TextBox3.Value = .Offset(0, 1).Value
TextBox4.Value = .Offset(0, 0).Value
TextBox5.Value = .Offset(0, 2).Value
TextBox6.Value = .Offset(0, 3).Value
TextBox7.Value = .Offset(0, 4).Value
TextBox8.Value = .Offset(0, 5).Value
TextBox9.Value = .Offset(0, 6).Value
TextBox10.Value = .Offset(0, 7).Value
End With
End Sub

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top