Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SelectionChange or Defined Name Selection Difference
Hello,
What I'm trying to do is see how many rows get added to a list after the dataform inserts records on the list. Tom O pointed me in the direction of either using defined names or the Selection Change. I've not been able to use either. My purpose for doing this is to be able to use that number of rows that are inserted on that list to insert that many rows in a particular spot on a summary sheet and then populate the summary sheet with formulas in those inserted rows which will then display values. Basically I just want a summary sheet to do calculations on newly inserted rows on the list sheet. I need the number of rows because the summary sheet cannot just insert the new calculations anywhere it has to insert it before say a row that has totals at the bottom of that calculated list. If anyone has any ideas of how to implement this please let me know. Thank you. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SelectionChange or Defined Name Selection Difference
Well I figured it out a way.
Dim lastrow As Long Dim newlastrow As Long Dim lstrowdiff As Long lastrow = ActiveSheet.Cells(Rows.count, "A").End(xlUp).Row ActiveSheet.ShowDataForm newlastrow = ActiveSheet.Cells(Rows.count, "A").End (xlUp).Row lstrowdiff = newlastrow - lastrow MsgBox (lastrow) MsgBox (newlastrow) MsgBox (lstrowdiff) I figured that I would put this here incase anyone else ever need an answer to the question. -----Original Message----- Hello, What I'm trying to do is see how many rows get added to a list after the dataform inserts records on the list. Tom O pointed me in the direction of either using defined names or the Selection Change. I've not been able to use either. My purpose for doing this is to be able to use that number of rows that are inserted on that list to insert that many rows in a particular spot on a summary sheet and then populate the summary sheet with formulas in those inserted rows which will then display values. Basically I just want a summary sheet to do calculations on newly inserted rows on the list sheet. I need the number of rows because the summary sheet cannot just insert the new calculations anywhere it has to insert it before say a row that has totals at the bottom of that calculated list. If anyone has any ideas of how to implement this please let me know. Thank you. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Display sum of selection with SelectionChange procedure | Excel Programming | |||
SelectionChange Event | Excel Programming | |||
selectionchange problem | Excel Programming | |||
SelectionChange problem | Excel Programming | |||
How do I convert a user defined selection into an array? | Excel Programming |