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: 71
Default adding row from userfrom and copying formulas

I have the following code that will add a record to the next blank row.


Private Sub cmdAdd_Click()
' Save form contents before changing rows:
SaveRow

' Set current row to first empty row, i.e. one row after
' the last row currently in use:
If Cells(1, 1).Value = "" Then
lCurrentRow = 1 ' (list is empty - start in row 1)
Else
lCurrentRow = ActiveSheet.UsedRange.Rows.Count + 1
End If

' Clear the form for user to add new name:
LoadRow

' Set focus to Name textbox:
txtReqNum.SetFocus
End Sub

What I would like to do is instead of add the userform data to the
blank row is to add a new row and add the userform data to that new
row.

I have existing data in columns A:O (this is also where the new data
from the userform will be added, but in the newly added row) and I have
hidden formulas that counts up the various values of A:O in columns
P:AG. I need the formulas from the previous row that currently has
existing hidden formulas (P:AG) copied to the new row that we just
added in the same range (P:AG). I also have the sums of colums P:AG
added up in the row below the new added row in the same range P:AG in
each of those columns and need the sum formula updated to reflect the
counts of the newly added row data.

I know this may be very complicated (it is for me at least) so any help
would be greatly appreciated. Thanks.

 
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
Userfrom problem... the dude Excel Discussion (Misc queries) 3 May 31st 06 09:33 PM
How do you use DTpicker in a Userfrom TDR Excel Discussion (Misc queries) 2 August 9th 05 01:43 PM
sum function in a userfrom niteman[_2_] Excel Programming 2 January 4th 05 08:39 PM
Userfrom textboxes Jo[_6_] Excel Programming 2 October 21st 03 06:56 PM
Userfrom textboxes Jo[_6_] Excel Programming 1 October 21st 03 05:47 PM


All times are GMT +1. The time now is 10:43 PM.

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"