ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Worksheet_Change event (https://www.excelbanter.com/excel-programming/381780-re-worksheet_change-event.html)

Tom Ogilvy

Worksheet_Change event
 
Target, an argument in the worksheet_Change event holds a reference to what
has changed.

Right click on the sheet tab and select view code. Put in code like this:

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox Target.Address
End Sub

Then play around with your sheet.

--
Regards,
Tom Ogilvy






"TimD" wrote in message
...
I am using the Worksheet_Change event to manipulate data on a sheet.

Can I capture the event that has caused a change to the worksheet. Like
the
difference between deleting an entire row and deleting a specified range.





Chip Pearson

Worksheet_Change event
 
There is no way to determine whether the Change event was caused by VBA or
by the user. Your code should be written so that it doesn't matter.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)


"TimD" wrote in message
...
I am currently using the target object. I have drilled down into many of
it's
properies. I am not finding anything that looks like what event caused
target
to change.

"Tom Ogilvy" wrote:

Target, an argument in the worksheet_Change event holds a reference to
what
has changed.

Right click on the sheet tab and select view code. Put in code like
this:

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox Target.Address
End Sub

Then play around with your sheet.

--
Regards,
Tom Ogilvy






"TimD" wrote in message
...
I am using the Worksheet_Change event to manipulate data on a sheet.

Can I capture the event that has caused a change to the worksheet. Like
the
difference between deleting an entire row and deleting a specified
range.









All times are GMT +1. The time now is 10:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com