fixing problem show headers in multiple comboboxes

Mussa

Board Regular
Joined
Jul 12, 2021
Messages
240
Office Version
  1. 2019
  2. 2010
hi expert
I no know where is the problem . it shows the headers in multiple comboboxes when search specific item . as to the code it will search from row2 , but in comboboxes also show header as in my pictue (CODE)is header
1.PNG

this is the code
VBA Code:
Private Sub UserForm_Initialize()
With Sheets("BRANDS")
   With .Range("A2", .Cells(.Rows.Count, "A").End(xlUp))
        For i = 1 To 4
            Me.Controls("ComboBox" & i).List = .Offset(, i - 1).Value
            Me.Controls("ComboBox" & i + 4).List = .Offset(, i - 1).Value
            Me.Controls("ComboBox" & i + 8).List = .Offset(, i - 1).Value
            Me.Controls("ComboBox" & i + 12).List = .Offset(, i - 1).Value
            Me.Controls("ComboBox" & i + 16).List = .Offset(, i - 1).Value
            Me.Controls("ComboBox" & i + 20).List = .Offset(, i - 1).Value
            Me.Controls("ComboBox" & i + 24).List = .Offset(, i - 1).Value
            Me.Controls("ComboBox" & i + 28).List = .Offset(, i - 1).Value
            Me.Controls("ComboBox" & i + 32).List = .Offset(, i - 1).Value
            Me.Controls("ComboBox" & i + 36).List = .Offset(, i - 1).Value
            Me.Controls("ComboBox" & i + 40).List = .Offset(, i - 1).Value
            
             Me.Controls("ComboBox" & i + 44).List = .Offset(, i - 1).Value
        Next
    End With
End With




End Sub

Private Sub ComboBox2_Change()
Dim c As Range
With Sheets("BRANDS")
  
   Set c = .Range("B:B").Find(What:=ComboBox2.Value, LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
    SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
    If Not c Is Nothing Then
        ComboBox3.Value = c.Offset(, 1).Value
        ComboBox4.Value = c.Offset(, 2).Value
        ComboBox5.Value = c.Offset(, 3).Value
        TextBox1.Value = c.Offset(, 4).Value
      
    End If
End With
End Sub
any idea experts,please?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,214,968
Messages
6,122,506
Members
449,089
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top