Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
combo box selection disappearance
Okay, to put as much detail as I can because this problem
is really bugging. 1.)in a basic excel sheet I went into view, toolbar, and created a number of combo boxes on a sheet. No form created. 2.)I wrote in the code ( Worksheet_SelectionChange): Me.CSQC.Clear Me.CSQC.AddItem "" Me.CSQC.AddItem "Michelle McGee" Me.CSQC.AddItem "Ted Herrera" Me.CSQC.AddItem "Don Anderson" Me.CSQC.AddItem "Ed MaaRouf" Me.CSQC.AddItem "Traci Willman" Me.CSQC.AddItem "Lori Bottom" Me.CSQC.AddItem "John A. Anderson" Me.CSQC.AddItem "Tim Crull" just an example of each combo box. 3.) now the user can select on of these choices. Let's say I pick michelle and then I click into a cell somewhere in the sheet. The selection disappears! I can't figure out why. please help. I got a feeling that it has to do with Worksheet_SelectionChange but since we are dealing with a sheet. would the above code go into activate or what? thank you. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
combo box selection disappearance
Chris,
Try putting your code in the Worksheet_Activate event instead of the SelectionChange event. The SelectionChange event fires when you select a different cell on your worksheet -- it doesn't refer to the combobox selection. The problem is that each time you select another cell on your worksheet, your code runs -- this code includes a Clear, so it wipes out anything you've picked on your combobox. Private Sub Worksheet_Activate() With Me.CSQC .Clear .AddItem "Michelle McGee" .AddItem "Ted Herrera" .AddItem "Don Anderson" .AddItem "Ed MaaRouf" .AddItem "Traci Willman" .AddItem "Lori Bottom" .AddItem "John A. Anderson" .AddItem "Tim Crull" End With End Sub -- Dianne In , chris typed: Okay, to put as much detail as I can because this problem is really bugging. 1.)in a basic excel sheet I went into view, toolbar, and created a number of combo boxes on a sheet. No form created. 2.)I wrote in the code ( Worksheet_SelectionChange): Me.CSQC.Clear Me.CSQC.AddItem "" Me.CSQC.AddItem "Michelle McGee" Me.CSQC.AddItem "Ted Herrera" Me.CSQC.AddItem "Don Anderson" Me.CSQC.AddItem "Ed MaaRouf" Me.CSQC.AddItem "Traci Willman" Me.CSQC.AddItem "Lori Bottom" Me.CSQC.AddItem "John A. Anderson" Me.CSQC.AddItem "Tim Crull" just an example of each combo box. 3.) now the user can select on of these choices. Let's say I pick michelle and then I click into a cell somewhere in the sheet. The selection disappears! I can't figure out why. please help. I got a feeling that it has to do with Worksheet_SelectionChange but since we are dealing with a sheet. would the above code go into activate or what? thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combo box selection will not calculate | Excel Worksheet Functions | |||
Linking to combo box selection | Excel Worksheet Functions | |||
Multiple Selection Combo Box | Excel Discussion (Misc queries) | |||
multiple selection in combo box | Excel Discussion (Misc queries) | |||
Disappearance of Sheet Numbers | New Users to Excel |