Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Forcing the cursor

Tom,

thank you, is the right solution.

Regards,

Ben


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
My cursor always in selection mode,wat about other cursor option Deepu[_2_] Excel Discussion (Misc queries) 1 March 2nd 10 01:05 AM
2 Q's: moving cursor / forcing a response psychobug Excel Discussion (Misc queries) 1 August 7th 09 11:49 PM
move cursor on one sheet moves cursor on all sheets tdworden Excel Discussion (Misc queries) 2 July 22nd 07 10:50 PM
Forcing the cursor to move to A of the next line after D of the pr Kitti Excel Discussion (Misc queries) 4 June 16th 07 04:42 PM
Can I change the "white cross" cursor in Excel to another cursor? KFEagle Excel Discussion (Misc queries) 1 May 3rd 05 08:01 PM


All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"