LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
SBO SBO is offline
external usenet poster
 
Posts: 6
Default How to get notified when user inserts cells, rows, or columns

Thank you for this suggestion, which I think is very good. I my scenario I'm
a bit worried about how Excel would handle thousands of named ranges, but I
should give it a try since there apparently is no other solution. So: thank
you very much for your help!

"JLGWhiz" wrote:

I mis-read the insert cells bit. Have you tried using named ranges to
overcome the reference changes caused by the user inserting cells, rows or
columns? The named range, although moved to a different relative location
on the sheet will keep the name and can be referred to by name in formulas
and code.



"sbo" wrote in message
...
The problem is that the Change event is emitted in many situations, both
when
deleting and inserting cells and when changing cell contents. Furthermore,
the insertion (or deletion) may push cells down (up) or right (left). So
more
accurate information is needed. I also thought of intercepting the user
action that initiated the change but it seems hopeless to catch all
scenarios.

"JLGWhiz" wrote:


Using the Worksheet_Change event, you could probably evaluate the row and
column values of the target cell against the criteria cell:

If Target < (Reference Cell) Then
If Target.Row <=( Reference Cell).Row And _
Target.Column <= (Reference Cell).Column Then
'Update code here
End If
End If

The outer If statement avoids inadvertant changes to the reference cell.
The inner statement then checks to see if the target cell that is changed
is
to the left or above the reference cell.


"sbo" wrote in message
...
I'm making a client to Excel that keeps references to cells on
worksheets.
These references must be updated if the user inserts cells to the left
or
above the referenced cells. I have not been able to find this
information,
neither in the Range that accompanies the Change notification nor in
any
of
the Worksheet, Workbook, or Application properties. Can anybody help
me?


.



.



 
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
How to get notified when inserting cells, rows, or columns in Exce sbo Excel Programming 0 March 12th 10 10:00 PM
Auto extract data & inserts rows additional rows automatically Meeru Excel Discussion (Misc queries) 3 September 9th 09 01:46 PM
How to be notified when user changes cell value in selected column? Jack Excel Programming 5 February 25th 07 10:33 PM
Detecting when Excel user inserts or deletes a row wjewell Excel Programming 3 November 2nd 05 09:02 AM
flexible paste rows function that inserts the right number of rows marika1981 Excel Discussion (Misc queries) 1 February 18th 05 02:40 AM


All times are GMT +1. The time now is 07:26 PM.

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

About Us

"It's about Microsoft Excel"