Synchronize Drop Down Lists

shellp

Board Regular
Joined
Jul 7, 2010
Messages
199
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
Hello

I have 3 worksheets with the same drop down lists but I want them to sync so that if "blue" is selected on worksheet 2 drop down then the other two worksheets also change to "blue" as well. Or the user can change worksheet 3 and then worksheet 1 and 2 change.

Thanks.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
How did you create these drop down lists?
 
Upvote 0
The drop down lists are created by using data validation, list, and a named range of color_names.

In working on this I used the following code:
Code:
Private Sub Worksheet_Change(ByVal Target as Range)
Dim tSheet1 as worksheet

If not intersect(Target, Range("D2")) is nothing then
set tSheet1 = activeworkbook.Worksheets("Global_Trending")
tSheet1.Range("D2").value=Target.value
End If
End Sub

This works if I put in one worksheet but if have this code in two worksheets i.e. if I am in the global_trending worksheet and change the drop down it will change the drop down value on FC_Global_Trending worksheet or vice versa I get the error message "not enough system resources to display completely." Why is that? Thanks.
 
Last edited:
Upvote 0
Not sure why you get that error but whenever you have event code that changes values you should temporarily disable events, see below.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim tSheet1 As Worksheet

    If Not Intersect(Target, Range("D2")) Is Nothing Then
        Application.EnableEvents = False
        Set tSheet1 = ActiveWorkbook.Worksheets("Global_Trending")
        tSheet1.Range("D2").Value = Target.Value
        Application.EnableEvents = True
    End If
    
End Sub
 
Last edited:
Upvote 0
THANK YOU. The addition of application.enableevents=false/true fixed the problem so all is working now. Spent lots of time on this so greatly, greatly appreciated.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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