+ Reply to Thread
Results 1 to 4 of 4

Macro VBA Copy Paste Across Sheets Runtime '1004'

  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.

    Please Login or Register  to view this content.
    [B]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 [noparse][code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] after it.[/B]
    Last edited by arlu1201; 10-31-2012 at 11:36 AM.

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

    Re: Macro VBA Copy Paste Across Sheets Runtime '1004'

    Sorry my mistake the reason I got the error was because during testing I did not have any data being generated and was pasteing blank data. Other than that the above code works. Although are there any suggestions on how to modify for efficiency. The data is coming from Access database.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro VBA Copy Paste Across Sheets Runtime '1004'

    Your code can be re-written as follows -
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

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

    Re: Macro VBA Copy Paste Across Sheets Runtime '1004'

    Thank you Arlette I will try it out!

+ 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