LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default

Sorry, answering another question. I have found it now, so will go and post
there :-)

Bob

"Bob Phillips" wrote in message
...
Here is a technique that Rob Bovey posted some time ago. It is a kludge as
Rob says, but it may work for you

There's no direct way to do this. I created a workaround for one

project
where I needed to do this, but it was very clunky. As a rule, I always

hide
the first row and column of worksheets in my projects. This gives me

scratch
space to work in and is required for this solution to work (at least the
hidden first column is required in this case).


In my hidden first column I placed the number 1 in every cell of the
area the user might interact with (let's say A1:A100). Then in cell A101 I
placed the formula


=COUNTBLANK(A1:A100)


and gave it the range name "CheckInsert". In cell A102 I placed the *array
formula* (entered with Ctrl+Shift+Enter)


=MATCH(TRUE,ISBLANK(A1:A100),0*)


and gave it the range name "FindInsert".


Each time the worksheet_calculate event fired, I would check the
CheckInsert cell. If it contained any number other than zero, I would know
the user had inserted a row, and how many they had inserted. The

FindInsert
range would then contain the number of the row where the insert began.


I would then turn off calculation, take the action I needed to take,

add
1s into the just-inserted rows, and turn calculation back on. You can

extend
this general method to include finding deletions by using sequentially
numbered cells in the first column, rather than 1s.


--
Rob Bovey, MCSE
The Payne Consulting Group
http://www.payneconsulting.com



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Old Car" wrote in message
news:2Smbe.6014$Nc.5775@trnddc05...
Thanks. Using that technique, I find that closing the window causes

that
event to fire. Is there a way to test for the fact that the Exit event

is
firing because a "Close" button is being selected?







 
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 do I isolate my Excel server (automation) from other Excel instances? Joseph Geretz Excel Discussion (Misc queries) 5 July 19th 13 03:18 PM
Excel chart-y axis title question springwinterfall Excel Discussion (Misc queries) 6 July 18th 05 02:27 PM
Hints And Tips For New Posters In The Excel Newsgroups Gary Brown Excel Worksheet Functions 0 April 15th 05 05:47 PM
Excel Question Les Excel Discussion (Misc queries) 2 March 16th 05 03:09 AM
Statistical Excel Function Question within Excel 2000... Drew H Excel Worksheet Functions 3 October 31st 04 06:55 PM


All times are GMT +1. The time now is 03:46 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"