Loop through drop down list and then call other macros

DPhilip

New Member
Joined
Jan 12, 2016
Messages
27
Good Morning. Anyone point out to me how to loop through a drop down list and then call another macro?

Ex. Drop down list:
Apple
Orange
Peach
Mango
Plum

I want it to go to apple first, run a macro I already use have then move to Orange and run the macro again until i get to plum and stop.

Right now I go to Apple then run the macro, then manually go to Orange, run the macro.. I have about 200 on my drop down list and this will save a lot of time.

Thanks in advance.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Can you post the exact code as you have it now?

Also, where is RunAllMacros located?
 
Upvote 0
SUB Loopthroughdropdown()
Dim oneThing as Variant
Dim ListOfThings as Variant

With Sheets("Control Slicer").Range("E3").Validation
If .Formula1 Like "=*" Then
ListOfThings = Evaluate(.Formula1)
Else
ListOfThings = Split(.Formula1, ",")
End If

For Each oneThing in ListOfThings
.Value = oneThing
Call Runallmacros
Next oneThing
End With
End Sub
Can you post the exact code as you have it now?

Also, where is RunAllMacros located?
 
Upvote 0

Forum statistics

Threads
1,223,532
Messages
6,172,878
Members
452,486
Latest member
standw01

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