VBA Event Worksheet_Change not working

erinmkurtz

New Member
Joined
Sep 8, 2015
Messages
10
Ok, I have super simple code and it refuses to work. I've used this code several times before on other workbooks and has done wonderfully.

Sub Worksheet_Change(ByVal Target As Range)
If Target.Address.Value = "$A$1" Then
Call MyMacro
End If
End Sub

Application.EnableEvents = True (I've triple checked)

My References, Microsoft Scripting Runtime is checked, Microsoft Forms 2.0 Object Library is selected.

Fresh out of ideas. I've read through all of the previous posts about this issue. Any fresh suggestions?

Thanks!
 
Re: VBA Eveent Worksheet_Change not working

I ran the code then used Ctrl + G to get to the immediate to run the ?Application.EnableEvents. This returned the value of True. Tried changing the cell again and still the same issue. Thanks!
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Re: VBA Eveent Worksheet_Change not working

I am utilizing Pivot Charts and I have a slicer changing the value of the pivot table on a separate tab. The cell that is changing is a title cell that is linked the changing filter selection. Thanks!
 
Upvote 0
Re: VBA Eveent Worksheet_Change not working

If A1 contains a formula, that is why your event is not being triggered.
Sheet_change events are triggered when you manually change a cell.
 
Upvote 0
Re: VBA Eveent Worksheet_Change not working

Got it! I tried steve the fish's suggestion and that worked! "If Not Intersect(Target, Range("A1")) Is Nothing Then"

Thanks for all the help everyone!
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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