Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Copy Sheet to another sheet not working

Posted on 2013-06-20
2
278 Views
Last Modified: 2013-06-20
I recorded a macro below but it does not work.  I get a run-time error 1004.  It is a simple copy one sheet to another.  I just can't figure out.

  Sheets("Prices").Select
   
Rows("3:1853").Select
    Selection.Copy
    Sheets("Compare").Select
   
    Range("A3").Select
    ActiveSheet.Paste
0
Comment
Question by:leezac
  • 2
2 Comments
 
LVL 81

Accepted Solution

by:
byundt earned 500 total points
ID: 39263846
Are the worksheets really named Prices and Compare? That's a common cause of run-time error 1004.

You could also try this one-liner:
Sub Copytron()
Sheets("Prices").Rows("3:1853").Copy Sheets("Compare").Range("A3")
End Sub

Open in new window

0
 
LVL 81

Expert Comment

by:byundt
ID: 39263867
Another possible cause is if worksheet Compare is protected. If so, the run-time error 1004 should say something about protected cells.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question