Results 1 to 4 of 4

Macro VBA Copy Paste Across Sheets Runtime '1004'

Threaded View

  1. #1
    Registered User
    Join Date
    04-17-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2003, 2007
    Posts
    8

    Macro VBA Copy Paste Across Sheets Runtime '1004'

    I need help with a Macro I created to automate some processes.

    MSQuery populates in worksheet 1
    Data is copied and pasted into first open cell of worksheet 2 when I get to the paste portion I receive: runtime error '1004' "The information cannot be pasted because the Copy area and the aste area are not.....".

    I am using this for multiple worksheets

    My code is below.

    Sub REFRESH()
    
        Sheets("import_DataSet1").Visible = True
        ActiveWorkbook.RefreshAll
        
        Sheets("import_DataSet1").Select
        Range("A2").Select
        Range(Selection, Selection.End(xlDown)).Select
        Range(Selection, Selection.End(xlToRight)).Select
        Selection.Copy
        Sheets("Data Paste").Select
        Range("B2").Select
        Selection.End(xlDown).Offset(1, 0).Select
        ActiveSheet.Paste
        Application.CutCopyMode = False
        
    
    End Sub
    Moderator's Edit: Use code tags whenever you post code in posts. To do so, either select your code and click the # button above or type [code] before your code and [/code] after it.
    Last edited by arlu1201; 10-31-2012 at 11:36 AM.

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