LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Controlling Row Inserts and Deletes Via Code

Hi all,

I have a problem which I hope someone can help with.

I have a workbook which has two sheets.
Sheet one is used to list the assets and Liabilities for a person.
Sheet two is essentialy a copy of the details on one with a couple of
extra columns, with forumula linking back to sheet one. This sheet is
used to detmine a distribution of the assest. (the workbook is used to
calculate asset distribution for a divorce :(

The problem is is a user deletes a row from sheet one then on sheet 2
it will show a #REF error

Sheet one example

A1 contains the words House
B1 Contains the amount $250000
A2 Contains the words Car
B2 Contains the amount $40000


Sheet 2
A1 contains formula =sheet1!A1
B1 Contains formula = Sheet1!b1-c1-d1
A2 contains formula = Sheet1!A2
B2 contains formula = Sheet1!b2-c2-d2

What I want to do is have it so if a user wants to enter a new row on
sheet one between the current bits of data a new row will also be
entered into sheet two and the formula would also be entered.
Then if a user deletes a row from sheet one that same row on sheet two
must also be delted.
I was thiking I might use a custom toolbar for these commands. So a
user just has to click on sheet one where they want the new row (or the
row to delete) then click a button on the toolbar to inert or delete



Any assistance would be greatly appreciatred. I have tried this with a
macro but cant seem to get it to work.

Many thanks in advance

David

 
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
Snapshot Inserts Sarah Excel Discussion (Misc queries) 1 June 20th 09 04:00 PM
Excel Inserts martins Excel Discussion (Misc queries) 1 July 19th 06 08:03 PM
Detecting when Excel user inserts or deletes a row wjewell Excel Programming 3 November 2nd 05 09:02 AM
controlling another application via VBA code in Excell & sending keystrokes & mouse clicks Zaidan Excel Programming 0 June 6th 04 09:06 PM
Modifying Code that deletes a Row Todd Huttenstine[_2_] Excel Programming 2 November 27th 03 10:41 PM


All times are GMT +1. The time now is 06:49 AM.

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"