Input data to another workbook.

wrightyrx7

Well-known Member
Joined
Sep 15, 2011
Messages
994
Hello all,

I have a macro that copies data from the Active Row onto another Worksheet. Which looks like this

Code:
Sub Test()
Sheets("Advance Payment").Cells(8, 1) = Cells(ActiveCell.Row, 6) & " " & Cells(ActiveCell.Row, 7)
Worksheets("Advance Payment").Cells(6, 2).Value = Cells(ActiveCell.Row, 1).Value
Worksheets("Advance Payment").Cells(2, 5).Value = Cells(ActiveCell.Row, 3).Value
Worksheets("Advance Payment").Cells(5, 5).Value = Cells(ActiveCell.Row, 4).Value
Worksheets("Advance Payment").Cells(15, 4).Value = Cells(ActiveCell.Row, 10).Value
Worksheets("Advance Payment").Cells(17, 5).Value = Cells(ActiveCell.Row, 11).Value
Worksheets("Advance Payment").Cells(18, 5).Value = Cells(ActiveCell.Row, 11).Value
Worksheets("Advance Payment").Cells(12, 4).Value = Cells(ActiveCell.Row, 12).Value
Worksheets("Advance Payment").Cells(1, 5).Value = Cells(ActiveCell.Row, 8).Value
Sheets("Advance Payment").Activate

End Sub

Is there anyway I can get this to open a closed workbook and input the data. The worksheet will be named the same and the cells will be the same.

Please ask if you need anymore information

Thanks
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,224,519
Messages
6,179,263
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