Send data to a sheet and another workbook at the same time

Jo4x4

Board Regular
Joined
Jan 8, 2011
Messages
136
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?

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
Thanks
Jo

XP, Excel 2007
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top