VBA code needed for drop-down menu automation

m_sabeer

New Member
Joined
Sep 12, 2013
Messages
24
Hi there,
I have created a workbook which has same drop down (consisting months) menu on cell J2 of every sheet. Now I want a code that will change all the other sheets drop down based on what is selected on active sheet. Like if my active sheet is "Men Branches" and I select the month of October from drop down menu. I want all the other sheet like Women Branches, Retail Sales, Services Sales to change their drop down to October. Hope its clear....I would be very thankful if any VBA genius can write this code for me.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I have a similar workbook which has 4 or 5 pages of different dynamic tables and charts. I have the same dropdown box on all 5 and when i change 1 it changes them all. However this was just incidental, it happened as i built it. Not sure how. I just copied and pasted the combo boxes and it worked. You sure it isn't already doing it? Is it an active x or a form control you are using? Mine was combo box active x.
 
Upvote 0
try the below, its untested

Sub UpdateCell()
Application.ScreenUpdating = False
'Start looping through all worksheets

Sheet = ActiveSheet.Name
R = Range("J2").Value
For Each WS In ThisWorkbook.Worksheets
WS.Activate

Range("J2").Value = R
Next WS

Sheets(Sheet).Activate

End Sub
 
Upvote 0
I have a similar workbook which has 4 or 5 pages of different dynamic tables and charts. I have the same dropdown box on all 5 and when i change 1 it changes them all. However this was just incidental, it happened as i built it. Not sure how. I just copied and pasted the combo boxes and it worked. You sure it isn't already doing it? Is it an active x or a form control you are using? Mine was combo box active x.

It will be in your VBA code, the default value will be stored in the same place
 
Upvote 0
try the below, its untested

Sub UpdateCell()
Application.ScreenUpdating = False
'Start looping through all worksheets

Sheet = ActiveSheet.Name
R = Range("J2").Value
For Each WS In ThisWorkbook.Worksheets
WS.Activate

Range("J2").Value = R
Next WS

Sheets(Sheet).Activate

End Sub

Not working :(
 
Upvote 0

Forum statistics

Threads
1,203,694
Messages
6,056,762
Members
444,890
Latest member
war24

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