Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Wescotte
 
Posts: n/a
Default Detecting when a user deletes a row

I have a script working using


Private Sub Worksheet_Change(ByVal Target As Excel.Range)


so I can format various cells after the user has entered data...


However when a user deletes an entire row the Worksheet_Change() and
since no value exist in each cell in that row (because it was just
deleted) my application resets to the default values. Basically
repopulating the row so it can never actually be deleted.


Now, my default values are pretty much "" so the row appears to be
empty to the user however say I had 500 rows and I erased 400 on the
bottom. If I go to print it will spit out quite a few more empty pages.



Now, one solution is to simply not allow for empty rows during the
printing process just erase them. But I really want the user to have
the ability to insert their own whitespace to make things easier to
read.


Really what I believe I need to do is figure out how detect when the
user is doing a right click on a row and clicking delete. Instead of
calling Worksheet_Change() perform the actual removal of the row.


Any idea how to do this?

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
Example User Form Required robertguy Excel Discussion (Misc queries) 0 October 4th 05 02:25 PM
Cells User Select Locked after upgrade to Excel 2002 TWilson Excel Discussion (Misc queries) 1 August 5th 05 12:22 PM
Finding a record based on user input Soundman Excel Discussion (Misc queries) 5 June 21st 05 03:06 AM
Positioning 2 User Forms mully New Users to Excel 3 June 11th 05 08:15 PM
Excel user management CTE Excel Discussion (Misc queries) 1 February 22nd 05 12:12 PM


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