Make 2 ComboBox's on different tabs be linked

igorski88

New Member
Joined
Jul 26, 2011
Messages
43
Hello,
I have two different tabs with a combo box in each I fill Both Combobox's with a list when the WorkBook opens. I am trying to link both combobox's. If combo box on Tab 1 changes then also change combo box on tab 2. This is all pretty easy but when custom text is received then that's when it creates a loop between themselves and crash. Please help!!!! Thank in advance

TAB 1
Code:
Private Sub ComboBox9_Change()


Sheet2.Range("AE4").Value = ComboBox9.Text
Sheet2.ComboBox10.Text = ComboBox9.Text




With ComboBox9
    'See if the text is in the list
    If .ListIndex > -1 Then
        Sheet2.Range("AE5").Value = .List(.ListIndex, 1) 'Colomn 2
    Else
       Sheet2.Range("AE5").Value = ""  'clear out the cell becouse the text entered is Custom
    End If
End With

TAB 2
Code:
Private Sub ComboBox10_Change()


Sheet2.Range("AE4").Value = ComboBox10.Text


Sheet4.ComboBox9.Text = ComboBox10.Text 'copy to AUTO tab


    
'See if the text is in the list
With ComboBox10
    If .ListIndex > -1 Then
        Sheet2.Range("AE5").Value = .List(.ListIndex, 1)
    Else
       Sheet2.Range("AE5").Value = ""  'clear out the cell becouse the text entered is Custom
    End If
End With
  
End Sub
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,216,075
Messages
6,128,667
Members
449,462
Latest member
Chislobog

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