Excel2000 - Worksheet_change does not fire on insert

G

Guest

Hi,
I have a question on Excel 2000 behaviour opposed to Excel XP and Excel 2003. To reproduce the issue, please use the following steps:

1) Open Excel 2000
2) Hit Alt+F11 to open the Visual Basic Editor
3) Double click on "Sheet1"
4) Paste the following code:

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "The Worksheet has changed!"
End Sub

5) Go to Sheet1 and do Insert->Rows to insert a new row in the worksheet

Now, on Excel 2000, the Worksheet Change event will never fire (the message box will not be displayed) while it will fire just fine on Excel XP and 2003. The event does not fire also when inserting columns or single cells. The test has been performed with Office 2003 SR-3.

Is this a know issue, or just intended behaviour? Interesting enough, the event fires when deleting cells.

Thank you for your time,

- Marco
 
N

Norman Harker

Hi Marco!

With the workbook active, try putting the following in the Immediate
Window

Application.EnableEvents = True

But I can't explain why you can delete cells as disabled events should
cover that as well.
 

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