Run macro after data validation selection

cybergremlin

New Member
Joined
Dec 11, 2018
Messages
22
Hi

I have the below code working fine but i also need to run macros depending on another data validation list in cell Q7

Private Sub Worksheet_Change(ByVal Target As Range)
Application.Screenupdating = False
If Target.Address(True, True) = "$C$7” Then
Select Case Target
Case “1”
Call Macro1
Case “2”
Call Macro2
Case Else
Application.Screenupdating = True
End Select



End If
End Sub

How do i incorporate another data validation into the code?

thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Try
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
   If Target.Address(0, 0) = "C7" Then
      Select Case Target
         Case "1"
            Call Macro1
         Case "2"
            Call Macro2
      End Select
   ElseIf Target.Address(0, 0) = "Q7" Then
      'do something
   End If
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,475
Messages
6,125,028
Members
449,205
Latest member
Eggy66

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