Worksheet_change not working

vbakh

New Member
Joined
Jun 21, 2011
Messages
1
For some reason in my excel worksheet_change seems to do nothing

for example the simple code below does nothing at all. Do I have something disabled that i should turn back on?

Private Sub Worksheet_Change(ByVal Target As Range)

MsgBox Target.Address

End Sub


thanks.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Welcome to the board...

sounds like you have Events Disabled..

In VBA window, click view - immediate window
Type

?Application.EnableEvents
Press Enter

That will return TRUE or FALSE

If False, then the events are disabled...

Type this to enable them

Application.EnableEvents = True
Press Enter


Hope that helps.
 
Upvote 0
If what Jonmo1 suggested does not work for you (ie your Events are already on), ensure that your code is placed in a worksheet module, and not just a regular module.
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,258
Members
452,901
Latest member
LisaGo

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