+ Reply to Thread
Results 1 to 2 of 2

Trouble Pasting

  1. #1
    Registered User
    Join Date
    08-04-2011
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    1

    Trouble Pasting

    I'm attempting to use a macro to copy data from one sheet to another in the same workbook , but I get a runtime error 1004.

    The code works on its own but not in a command button.

    Any help would be appreciated

    HTML Code: 
    Selection.Copy
        Sheets("Download").Select
        Columns("A:B").Select
        Range("A297").Activate
        ActiveSheet.Paste
        ActiveCell.SpecialCells(xlLastCell).Select
        Sheets("Raw Data").Select
        Range("A1").Select
        Application.CutCopyMode = False
        Sheets("July Data ").Select

  2. #2
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    PA
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Re: Trouble Pasting

    There are better ways,But I'm not clear on what you are trying to do for sure.

    So Try This:

    Put this command button script in your july sheet mod.

    Please Login or Register  to view this content.
    Thank You, Mike

    Some Helpful Hints:

    1. New members please read & follow the Forum Rules
    2. Use Code Tags...Place[code]Before the first line and[/code] After the last line.
    3. If you are pleased with a solution mark your post SOLVED.
    4. Thank those who have help you by clicking the scales at the top right of the post.

    Here...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1