View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Saving Customer Records Both New and Changed

Maybe just plop in the values like you did (255 (or 39) columns were ok!)

Then come back and fix column A.

wks_target.Rows(x) = wks_source.Rows(110).Value
wks_target.cells(x,"A").formula = wks_source.cells(110,"A").formula

Minitman wrote:

Greetings

I have to save my customers info from row 110 on sheet "Enter" to
ether the last row (New Customer Info) or the same row (Change Current
Customer Info) as the chosen customer in sheet "CI".

The problem is that I am currently saving the .Value to these two
locations and I really need to save the .Value only to Cells 2 - 40
and save the formula in cell A110 on "Enter" to cell 1 on "CI" (or
copy the formula from the cell above cell 1 on "CI", since it is the
same formula).

Here is the code for what I am currently doing:

Option Explicit
Dim x As Long
Dim wks_target As Worksheet
Dim wks_source As Worksheet
__________________________________________

Private Sub SaveCustInfoChanges_Click()

Set wks_target = Worksheets("CI")
Set wks_source = Worksheets("Enter")
x = Application.WorksheetFunction. _
Match(wks_source.Range("B1"), _
wks_target.Range("A1:A" & wks_target.Range("A" & _
Rows.Count).End(xlUp).Row), 0)

wks_target.Rows(x) = wks_source.Rows(110).Value

End Sub
__________________________________________________

Private Sub SaveInvAsNewRec_Click()

Set wks_target = Worksheets("INV")
Set wks_source = Worksheets("Enter")

x = wks_target.Range("A65536").End(xlUp).Row + 1
wks_target.Rows(x) = wks_source.Rows(100).Value

End Sub

I can't seem to figure out how to split up the pasting or add the
formula to cell 1 on "CI"!!!

Anyone have any ideas?

Any help would be appreciated.

TIA

-Minitman


--

Dave Peterson