tags:

views:

221

answers:

1

Hi all,

As a simpler way of saying "how to handle resize of range upon insert column/row in Excel via VSTO?":

Is there a way in excel VSTO to handle "insert row" or "insert column" event?

+1  A: 

There is no such event in Excel. You can pick up when a row is inserted or deleted via the Worksheet.Change or Application.SheetChange events.

For a detailed discussion of this see the article Deleted Rows by Dick Kusleika.

But if all you wanted to achieve was to ensure that your range object resizes when a row is inserted, then, as you noted, there is is nothing that you need to do, as the Range object would expand automatically.

Hope this helps!

Mike Rosenblum