View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.programming
Ben McClave Ben McClave is offline
external usenet poster
 
Posts: 173
Default Macro to choose data and export in another workbook

I see.

If your combo box is a "DropDown" type, then you could add a new variable to the code, and use that to populate the "sFind" variable. Here are the new lines to include:

Dim dd As DropDown 'DropDown box
Set dd = ThisWorkbook.Sheets("HOME").Shapes("Drop Down 1").OLEFormat.Object
sFind = dd.List(dd.ListIndex)

To determine if your combobox is a DropDown, enter this line in the Immediate Window to see if it returns "8":

Print ThisWorkbook.Sheets("HOME").Shapes("Drop Down 1").Type