Data Validation Drop Down List To Trigger Macro

pure vito

Board Regular
Joined
Oct 7, 2021
Messages
180
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Hopefully just a quick one 😬

My aim here is to use "C3" dropdown selection to trigger a macro based on the value, I have used Data Validation to populate the dropdown,

I have a working VBA that when text is entered manually into "C3" it runs the macro and it works fine but I can't seem to get the same result with the dropdown list,

I have been looking online for a solution but have just been coming across the same VBA,

Thanks in advance,

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("C3")) Is Nothing Then
        Select Case Range("C3")
            Case "Base Set Series": Baseset
           
        End Select
    End If
End Sub


1675752794741.png
 
I think that if you had looked closely at the second message box, the culprit space would have been visible. :)

1675757564015.png
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
That's great tool to make use of in the future thanks Peter, I was going to post the screen shot of that but for whatever reason didn't it's the little things 😅 (y)
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,545
Members
449,317
Latest member
chingiloum

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