View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Katie Katie is offline
external usenet poster
 
Posts: 130
Default Need One combo box row source to change based on the value of anot

I can't seem to get it to work. I keep getting "object doesn't support this
property or method, even though I see the property in the list of options.

I have ProdCatValue defined as a public string variable, and I call the
procedure from the first dropdown box.


Here is the code:

Public Sub FilterProductNames()
Select Case ProdCatValue

Case "A"
Sheets("Form")!cboProductName.RowSource = "Reference!G4:G13"
Case "B"
Sheets("Form")!cboProductName.RowSource = "Reference!I4:I16"
Case "C"
Sheets("Form")!cboProductName.RowSource = "Reference!K4:K9"
Case "D"
Sheets("Form")!cboProductName.RowSource = "Reference!C19:c23"
Case "E"
Sheets("Form")!cboProductName.RowSource = "Reference!E19:E73"

Case Else

End Select

End Sub

I have also tried it with listfillrange instead of rowsource, but neither
works.

I have also tried it directly in the on change event for the first combo,
with everything enclosed. (I moved it to a public sub because I thought at
first that the data type for the listfillrange / rowsource property was range
instead of string, and the range was on another worksheet.)

What am I doing wrong?

Katie