Form Tab to text fields Excel 2000

G

Guest

Hello, I am new to Excel form development and this is the code I have set for
44 texboxes to advance through the boxes. However, this does not scroll down
the page. I am tabbing to the correct box but cannot see it!

Private Sub TextBox1_KeyDown(ByVal _
KeyCode As MSForms.ReturnInteger, _
ByVal Shift As Integer)
If KeyCode = 9 Then TextBox2Activate


End Sub

Private Sub TextBox2_KeyDown(ByVal _
KeyCode As MSForms.ReturnInteger, _
ByVal Shift As Integer)
If KeyCode = 9 Then TextBox3.Activate


End Sub
 
G

Guest

You don't have to make Keydown code to every Textbox, because you can scroll
between Textbox's by pressing the TAB key on your keyboard. You only have to
assign to every Textbox in Textbox Properties -> TabStop = True and also
TabIndex from 0 to 43 as you wish to scroll in right order.

The problem with size of your Form you can solve by decreasing the size in %
on Form Properties -> Zoom. When It is for any reason not possible make
another Form an by reaching the last Textbox you can make code to load next
Form by Exit event.

„~KO" napísal (napísala):
 

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