Copy/Paste Excel Named Ranges on inactive sheet

As part of a larger macro (already working), I would like to copy the data from the Start range on Sheet2 to the Finish range on the same sheet.  The ranges are the same size and are on an inactive sheet.  The code I have gives me Run-time error '1004': Method 'Range' of object '_Worksheet' failed.  I am including the pertinent code.  I am sure I am missing something stupid.  Any help is greatly appreciated.

Dim sourceSht As Worksheet, outputSht As Worksheet
Dim sourceRange As Range
Dim start As Range
Dim finish As Range

'Set the active sheet to the current sheet
Set sourceSht = ActiveSheet

'Set the output to Sheet2
Set outputSht = ActiveWorkbook.Sheets("Sheet2")

'Set the start variable to the Start range on Sheet 2
Set start = outputSht.Range("Start")

'Set the finish variable to the Finish range on Sheet 2
Set finish = outputSht.Range("Finish")

'Turn off screen updating
Application.ScreenUpdating = False

'Copy the cells from the Sheet2 Start range and copy them to the Sheet 2 Finish range
start.Copy (finish)

Open in new window

M_PattonAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
Hi,

pls try (line 13 sourceSht instead of outputSht)

Dim sourceSht As Worksheet, outputSht As Worksheet
Dim sourceRange As Range
Dim start As Range
Dim finish As Range

'Set the active sheet to the current sheet
Set sourceSht = ActiveSheet

'Set the output to Sheet2
Set outputSht = ActiveWorkbook.Sheets("Sheet2")

'Set the start variable to the Start range on Sheet 2
Set start = sourceSht.Range("Start")

'Set the finish variable to the Finish range on Sheet 2
Set finish = outputSht.Range("Finish")

'Turn off screen updating
Application.ScreenUpdating = False

'Copy the cells from the Sheet2 Start range and copy them to the Sheet 2 Finish range
start.Copy finish

End Sub

Open in new window

regards
M_PattonAuthor Commented:
Same error (plus that is not where the data is).
ProfessorJimJamMicrosoft Excel ExpertCommented:
can you try this

Dim sourceSht As Worksheet, outputSht As Worksheet
Dim sourceRange As Range
Dim start As Range
Dim finish As Range

'Set the active sheet to the current sheet
Set sourceSht = ActiveSheet

'Set the output to Sheet2
Set outputSht = ThisWorkbook.Worksheets("Sheet2")

'Set the start variable to the Start range on Sheet 2
Set start = outputSht.Range("Start")

'Set the finish variable to the Finish range on Sheet 2
Set finish = outputSht.Range("Finish")

'Turn off screen updating
Application.ScreenUpdating = False

'Copy the cells from the Sheet2 Start range and copy them to the Sheet 2 Finish range
start.Copy finish

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

M_PattonAuthor Commented:
Same error.

BTW: Debugger indicated issue is in line 10.
ProfessorJimJamMicrosoft Excel ExpertCommented:
please see the attached file.

i have put the macro in the workbook. i have the two named ranges start and finish

and when u run the macro, it will copy the start range and will paste it in finish range.

no error is there.

please let me know if you get any error in this workbook.
Book1.xlsm
M_PattonAuthor Commented:
PJJ--

Thank you for the workbook; it brought to my attention that my named ranges had not been saved.  Once that happened, your previous code worked.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.