Using a Combo Box text selection to find text on another worksheet

  • Thread starter Thread starter Nickis
  • Start date Start date
N

Nickis

Hi,
I have set up a combo box using an input range from another worksheet. I
want to be able to make a selection in the combo box and then have the macro
go to another worksheet and find the first instance of that selected text and
then loop through to find all subsequent instances of that selected text.
I'm stuck on the first part though, actually finding the text.

I found the following code which I thought would help, but I'm not sure of
the reference to 'UserForm1.ComboBox1'. I'm not sure how to reference the
specific combo box or it's text, and I'm not even sure if the code below is
correct.

Worksheets("SheetName").Cells.Find(UserForm1.ComboBox1.Text).Select

Any help or input would be appreciated.

Nicki
 
Try

varSearch = Me.ComboBox1.Text
With Worksheets("Sheet1")
..Activate
..Cells.Find(varSearch).Select
End With

If this post helps click Yes
 
Back
Top