worksheet change macros inconsistant

tjlaser shepard

New Member
Joined
Jun 1, 2016
Messages
7
I have the following macros set up in one worksheet "code-behind" page to call other macros when specific cells are changed:

---------------------------------------------------
Private Sub worksheet_change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("B9")) Is Nothing Then Call LimitRigDropdown
End Sub

-----------------------------------------------------
Private Sub worksheet_change2(ByVal Target As Range)
If Not Intersect(Target, Me.Range("E9")) Is Nothing Then Call unhideList
End Sub
-----------------------------------------------------

the first one works, but I can't get the second to trigger. I know it's not a problem with the unhideList macro because I used a STOP after the inner "if" statement to check if the event handler is even triggered (it isn't). Is there any reason why only one of these would work?

TIA
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
You can only have one change event macro in a worksheet. The _change2 is not valid as a change event macro. You can combine the two like this:
Code:
Private Sub worksheet_change(ByVal Target As Range)
    If Not Intersect(Target, Me.Range("B9")) Is Nothing Then Call LimitRigDropdown
If Not Intersect(Target, Me.Range("E9")) Is Nothing Then Call unhideList
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

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