Solved

VB.net/VSTO Excel Add-in Handle row deletion event

Posted on 2013-05-10
3
1,190 Views
Last Modified: 2013-05-13
Hi

I currently use the following event in my Excel VB.net Add-in to handle changes to cells.
How do I handle the deletion of Excel rows

Private Sub Application_SheetChange(Sh As Object, Target As Microsoft.Office.Interop.Excel.Range) Handles Application.SheetChange
0
Comment
Question by:murbro
3 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 39160830
There is no event specifically for inserting or deleting rows. You can use a named range well below the data you expect and then monitor its row number when the target.columns.count = sheet.columns.count (which it has to if you are inserting / deleting rows). If the row number has decreased then a row has been deleted.
0
 
LVL 36

Accepted Solution

by:
Miguel Oz earned 500 total points
ID: 39161269
As mentioned on previous post, Excel does not offer such event, but you can use the other events to monitor the number of deleted rows, for example check:
http://dailydoseofexcel.com/archives/2006/08/21/capture-deleted-rows/
0
 

Author Closing Comment

by:murbro
ID: 39162056
Thanks very much
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that undeā€¦
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question