Automatically update combo box options?

Mahwill

New Member
Joined
Jun 8, 2011
Messages
6
I have three combo boxes, one for client name, one for account number and one for the carrier. When a user selects the client name I have another sheet that filters all account numbers based on this client name. I have this working but it order for the account number combo box to update, I must click on a random cell in the worksheet. Is it possible to select the client name and go directly to the account number combo box without clicking a random cell first to make it update?

Here is the code I use.

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim DropSTR As Variant 'String for values in Range
Application.CalculateFullRebuild

      Dim i As Integer

           For i = 1 To ComboBox1.ListCount
               ComboBox1.RemoveItem
           Next i
   
       DropSTR = ""

       
        For Each cell In Sheets("Client Info").Range("I2:I120")
                If cell.Value <> "" Then
                DropSTR = cell.Value
               With ComboBox1
    .AddItem DropSTR
    End With
                End If
        Next
        
        Range("I1").Value = ComboBox1.Value

End Sub

If someone could help me out with this I would really appreciate it.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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