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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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
You are welcome - thanks for the reply.
 
Upvote 0

Forum statistics

Threads
1,216,131
Messages
6,129,066
Members
449,485
Latest member
greggy

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