Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forcing the cursor
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forcing the cursor
Userform?
change the tabindex property to zero for Textbox1. -- Regards, Tom Ogilvy "B Wassen" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forcing the cursor
Tom,
thank you, is the right solution. Regards, Ben |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
My cursor always in selection mode,wat about other cursor option | Excel Discussion (Misc queries) | |||
2 Q's: moving cursor / forcing a response | Excel Discussion (Misc queries) | |||
move cursor on one sheet moves cursor on all sheets | Excel Discussion (Misc queries) | |||
Forcing the cursor to move to A of the next line after D of the pr | Excel Discussion (Misc queries) | |||
Can I change the "white cross" cursor in Excel to another cursor? | Excel Discussion (Misc queries) |