Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default detecting row or col insertion & deletion

Hi,

This is a follow up from a previous thread,


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
No, there is no way native to Excel to determine when a column or row has
been added or deleted.
There are as many ways around this as there are VBA experts:



Well, i seem to have hit on a VBA way around this like you said but iam
not sure if this is ok - it is based on UsedRange.

Basically, i track UsedRange all the time and keep updating the range
address returned by UsedRange. Whenever a SheetChange event is caused
due to a column insertion or deletion, the dimensions of UsedRange address
either swell or reduce, compared to the last measured address.

To confirm it all you need is a MsgBox with UsedRange.Address in the
SheetChange event of the workbook

Has anyone tried this before ?

The only problem that i found was that if i enter data only in the IV column
then usedrange is returned as $4:$2323 (I enter data only in 4th cell &
2323rd cell).

Is this a valid address (where else or how else can i see it)? or is this a
bug with UsedRange ? I have seen so many bugs reported with UsedRange
but most of them seem to be regarding extra rows reported, which is not
an issue for me. Is there any other probelm with this ?

thanks
arun
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row Insertion mlockman Excel Discussion (Misc queries) 0 April 17th 09 03:33 PM
detecting row or column insertion & deletion arun Excel Programming 5 July 28th 04 07:26 PM
Detecting Row Deletion Doug Glancy Excel Programming 0 July 6th 04 06:56 PM
Detecting Row Deletion GaryZ Excel Programming 0 July 6th 04 06:33 PM
Class module to detect row deletion or insertion ? brettdj Excel Programming 1 October 7th 03 01:16 PM


All times are GMT +1. The time now is 12:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"