Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using the Worksheet_Change event handler does not seem convenient as I often
don't need to change the contents of "C5". So in this case the event isn't triggered. I'm now experimenting with the Worksheet_SelectionChange event sub, and I'll be playing around for a while. If I make it I'll drop by to post the final code. "crazybass2" wrote: Lluis, Place the following code in the sheet module. You will need to change the "ComboBox1/ComboBox2" references in the code to match the name of your combo boxes. Play around with the 'Activate' and 'DropDown' methods for the desired effect (ie. delete 'ComboBox1.Activate:' and ': ComboBox2.DropDown' to see what changes). Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("C5")) Is Nothing Then ComboBox1.Activate: ComboBox1.DropDown If Not Intersect(Target, Range("C8")) Is Nothing Then ComboBox2.Activate: ComboBox2.DropDown End Sub Private Sub ComboBox1_Change() Range("C8").Select End Sub Private Sub ComboBox2_Change() Range("C11").Select End Sub Mike "Lluis Escude" wrote: After I've typed data + return key to a specific cell, say C5, I want the focus to be automatically transferred to a combobox in the same worksheet. What code do I need and where -in what event handler- must it be placed? Then, after I've selected one of the combo items (and maybe -maybe not- hit the return key as well) I want the focus to be automatically set to some other cell, such as C8. Same question as above. The idea is to cycle through a number of cells and comboboxes so that no cells can be selected/activated that don't require input data. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert combo box in a cell | Excel Discussion (Misc queries) | |||
Filtered list for Combo Box ListFillRange - Nested Combo Boxes | Excel Programming | |||
Getting A Value from a Combo Box to a Cell?? | Excel Discussion (Misc queries) | |||
Cell Bound Combo Box | Excel Programming | |||
Setting the value of a cell from a combo box | Excel Programming |