" Drop Down Lists in one worksheet - adding separate macros to each

jfearn

New Member
Joined
Sep 18, 2019
Messages
2
Hi there, I know very little about VBA, only starting using it this week by copying from Google, so my understanding of it is very small.

I've been searching the net for a solution to my problem, however given my lack of understanding of VBA, have not been able to decipher solutions on Google

I have created a form in Excel, which contains a number of drop down lists. I have also saved a number of macros which I would like to activate upon specific drop down selections being made. I have been able to get a set of 2 macros to work on one drop down by using the following code:


Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("c60")) Is Nothing Then
Select Case Range("c60")
Case "Abseil_Plan": Abseil_Plan
Case "Climbing_Plan": Climbing_Plan
End Select
End If
End Sub


I have read however that you can only use one instance of Private Sub Worksheet_Change(ByVal Target As Range) per worksheet.
Is this true?
If it is possible, how do I add a separate set of macros to a different drop down list within the same worksheet? I just want to keep it simple

Thanks, appreciate any help you may have

Jackie :cool:
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi & welcome to MrExcel.
You can do it like
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("c60")) Is Nothing Then
   Select Case Range("c60")
      Case "Abseil_Plan": Abseil_Plan
      Case "Climbing_Plan": Climbing_Plan
   End Select
ElseIf Not Intersect(trget, Range("D6")) Is Nothing Then
   'do something
End If
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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