Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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
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
Display sum of selection with SelectionChange procedure Herman[_4_] Excel Programming 3 August 16th 04 01:42 PM
SelectionChange Event Squid[_3_] Excel Programming 5 February 11th 04 01:57 PM
selectionchange problem micher Excel Programming 2 January 27th 04 07:15 PM
SelectionChange problem Micher Excel Programming 0 January 23rd 04 10:26 PM
How do I convert a user defined selection into an array? TBA[_2_] Excel Programming 3 August 18th 03 12:51 AM


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