help with detination

JohnF

New Member
Joined
Jul 9, 2005
Messages
32
The below was supplied to me by tactps (works but) in a previous post.

I want the part after the destination to copy the data to a separate workbook the path is C:\Projects\MasterSchedule.xls the sheet is called Master.

If this can be done will it work with the destination workbook closed.

range("A10:A"&[a65536].end(xlup).row).entirerow.copy destination:=Sheets("Master").[a65536].end(xlup).offset(1,0)
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Try this:

Code:
Range("A10:A" & Range("A" & Rows.Count).End(xlUp).Row).EntireRow.Copy Workbooks("C:\Projects\MasterSchedule.xls").Worksheets("Master").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)

Far as I know, it will not work with the destination closed. I've never done that myself, but I searched the board and found some posts on writing to a closed workbook. Here's one. Hope that helps!
 
Upvote 0
Error when this is run

I get a run time error when I run this

Run time error 9

Subscript Out of range

Am I doing something wrong?
 
Upvote 0
Are the workbook and worksheet names spelled properly?

And the workbook is open, right?
 
Upvote 0

Forum statistics

Threads
1,203,696
Messages
6,056,764
Members
444,891
Latest member
MelissaBr

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