Tab Key & Combo Selection
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!
Re: Tab Key & Combo Selection
Quote:
Originally Posted by yanty
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?
Quote:
Originally Posted by yanty
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.
Re: Tab Key & Combo Selection
Thank you. The change event worked.
VB Code:
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.