PDA

Click to See Complete Forum and Search --> : Tab Key & Combo Selection


yanty
Jan 23rd, 2006, 12:14 AM
I'm using Microsoft Excel and I want to use the 'tab' key to move from controls to controls.
I also want to select item named 'Classic' from combobox and another textbox will show text "A classic package". No database. Done statically.

Anyone can share his/her knowledge? Thks!

DKenny
Jan 23rd, 2006, 08:11 AM
I'm using Microsoft Excel and I want to use the 'tab' key to move from controls to controls.
Are your controls on a form or are they on a worksheet?


I also want to select item named 'Classic' from combobox and another textbox will show text "A classic package". No database. Done statically.

The easiest way to do this is to link the combobox to a cell (Cell1) and the textbox to another cell (Cell2). Then you csn build a formula in Cell2 that references the value in Cell1.
Or if you want to achieve this using VBA, you would use the _Change event of the combobox to populate a value in the textbox.

yanty
Jan 23rd, 2006, 08:38 PM
Thank you. The change event worked.

Private Sub ComboBox1_Change()

If ComboBox1.ListIndex = 0 Then
TextBox24.Text = "Classic"
Else
ComboBox1.ListIndex = -1
TextBox24.Text = "Exclusive"
End If

End Sub


My controls are on a worksheet.