Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo box selection will not calculate Perrysbox2 Excel Worksheet Functions 1 June 11th 09 09:21 PM
Linking to combo box selection PSM[_14_] Excel Worksheet Functions 1 May 21st 09 12:57 AM
Multiple Selection Combo Box Ivor Davies Excel Discussion (Misc queries) 8 April 27th 09 12:43 PM
multiple selection in combo box jen_writer Excel Discussion (Misc queries) 2 January 19th 07 09:05 PM
Disappearance of Sheet Numbers Wquinn New Users to Excel 1 December 12th 05 02:12 AM


All times are GMT +1. The time now is 10:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"