View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Alan Davis Alan Davis is offline
external usenet poster
 
Posts: 2
Default Determining a combo box by code

Thanks Dave,

My problem is that this combo box is on a pivot table. I'm not sure if I can
refer to the pivot table cell and get the cell address. There are a bunch of
comb boxes (which are dimension filters) to choose from.

"Dave Peterson" wrote:

It might be easier to look at the combobox and find out where it is.

If the combobox is from the control toolbox toolbar:
msgbox worksheets("sheet2").oleobjects("combobox1").tople ftcell.address

If the combobox (AKA DropDown) is from the Forms toolbar:
msgbox worksheets("sheet2").dropdowns("drop down 1").topleftcell.address

Alan Davis wrote:

I have a pivot table that can move the location of a combo box depending on
how many rows it returns. Is there any way to determine which cell the combo
box is in.
Something like:
For x = to beginRange to EndRange
if range("C:6") is Combo then ....

Thanks


--

Dave Peterson