View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default adding test and cell address to combo box.

When I do this I try to leave everything sequential so I can use the
Index of the combobox to shift columns, like this:
if ComboBox3 has options of data from K through M and "K" is selected
then
Range(Cells(3,ComboBox3.ListIndex +
10),Cells(18,ComboBox3.ListIndex)).Select

Let me know if you need help implementing that or if you need a
different solution altogether.

Charles Chickering

Kevin wrote:
ok, I have this code below that populates ComboBox3 with the text in MyRange.
What I would like to do is record the address of the cell somwhere for
reference once a value is selected in combobox3.

EX. If ComboBox3 is populated and I select the text that is on cell K1 I
need the address K1 recoreded somewhere so that I can populate a second combo
box with range k3:k18. Or if the text for L2 is selected I need a
second combo box with L3:L18 and so forth.

==========================================
Dim MyRange As Range
Set MyRange = Sheets("sheet1").Range("k1:z1,k21:z21")
For Each C In MyRange
If C = "" Then
GoTo 10
Else
ComboBox3.AddItem C.Value
End If
10: Next
==========================================