• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Increment and resolve error in information search and display

jrsilverio

New Member
I need help to adjust the code below, add a way to make it so that I can determine within worksheet 2 (plan2), which combobox will receive the information from which column.
Example:

ComboBox4 will receive from column A
ComboBox5 will receive from column B
....and so on

Another thing, why is this code giving an error 1004?
"Runtime Error 1004"


Code:
Dim mySheets, myControls, sht, uniqueList
Dim ncell As Long
Set mySheets = Sheets(Array("Plan2"))
myControls = Array(ComboBox4)
i = LBound(myControls)
For Each sht In mySheets
  With sht
    myControls(i).List = Application.Unique(.Range("A1:A" & .Cells(.Rows.Count, "A").End(xlUp).Row))
    i = i + 1
  End With
Next
 
Back
Top