Hi everybody,
I am currently using the code below to send data to another sheet on the same workbook.
Is there a way to send the same data to another workbook (same fields) at the same time?
Thanks
Jo
XP, Excel 2007
I am currently using the code below to send data to another sheet on the same workbook.
Is there a way to send the same data to another workbook (same fields) at the same time?
Code:
Sub Save()
'This just saves the results
Dim NR As Integer, NC As Integer
Dim Dest As Worksheet
Dim Src As Worksheet
Set Src = Worksheets("Input")
Set Dest = Worksheets("Results")
Dim c As Range
Dim val As Variant
'Goto new row on Results Sheet
Dest.Select
Range("a1").Select
Selection.End(xlDown).Select
NR = Selection.Row + 1
'Transfer results to Results sheet
Dest.Cells(NR, 1).Value = Src.Cells(8, 5).Value 'Date
Dest.Cells(NR, 2).Value = Src.Cells(10, 5).Value 'Name
For Each c In Range("C1:G1")
If c.Value = Src.Cells(17, 6).Value Then
NC = c.Column
End If
Next
Dest.Cells(NR, NC).Value = Src.Cells(14, 6).Value 'Price
Jo
XP, Excel 2007