Worksheet Change Event Help Please

J

J P Singh

Hi All

I wish to run a macro on any change in the data in a particular column and
have tried to use the following but the macro doesn't execuate automatically
when I change anything in my worksheet nothing happends and I don't get the
Msgbox.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Msgbox("Macro is running")

End Sub

Any help is greatly appreciated

Thanks

Jas
 
R

Rob Bovey

Hi Jas,

Two things to check right off the bat:

1) Is your macro security set to High? In Excel, check the
Tools/Macro/Security menu.

2) Have you got the code in the correct place? As written below, it needs to
go in the code module behind the worksheet into which you're entering
values. In the Visual Basic Editor, select this worksheet from the Project
window and choose View/Code from the menu. This is where the code should be.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top