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

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
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,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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