PDA

View Full Version : Solved: Request simple test in Excel 2000



GTO
02-11-2009, 01:19 PM
Greetings to all, and a Howdy to those I know,

Anyone with 2000 wanna run a simple test for me?

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "WorkSHEET_Change activated,", 0, ""
End Sub

...and...

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
MsgBox "Workbook_SheetChange activated.", 0, ""
End Sub

In short - I was looking to use the Change event to detect when a row was added or deleted. Seemed to be working fine in 2003, but in 2000, it was detecting deleting rows, but would blow right by adding them.

So, I am curious as to whether the causal is is my poor ol' laptop, or an Excel oddity.:dunno

Edit: forgot to mention that the test would be to then delete and add rows to the appropriate sheet and see whether the msgboxes display upon adding rows / deleting rows / or both...

Thank you so much,

Mark

mdmackillop
02-11-2009, 04:00 PM
I tried this earlier in 2000. The sheet change was not triggered by inserting a row. My thought was to set a variable to UsedRange.Rows.Count using Sheet.Activate then testing against this value after the change.

Bob Phillips
02-11-2009, 04:00 PM
No, this is a characteristic of Excel. I found this myself some years ago when I developed an app and it didn't work for my customer, they were using 2000.

GTO
02-11-2009, 04:49 PM
Reference inserting not being picked up...Well isn't that just peachy...

I was just looking at: http://www.vbaexpress.com/forum/showthread.php?t=25088 ..and was trying using a marker column when I found this out when I tried 'er out at home... (UsedRange.Rows.Count sounds niftier though)

Thank you both:beerchug: ,

Mark