+ Reply to Thread
Results 1 to 10 of 10

VBA error copying and pasting to sheet

  1. #1
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    392

    VBA error copying and pasting to sheet

    Here is the Code I have tried.
    Please Login or Register  to view this content.
    Last edited by alansidman; 10-27-2020 at 12:18 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,858

    Re: VBA error copying and pasting to sheet

    What is the error and when you click on Debug, what line of code is highlighted?
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,858

    Re: VBA error copying and pasting to sheet

    You may wish to change this line of code

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    392

    Re: VBA error copying and pasting to sheet

    The Range was the bug error. I copied you sugesstion and I get an error Highlight in Application.Union.Range("E3", "B7:B11", "E4", "B14:B17").Copy This is what pops up:

    Compile error:

    Wrong number of arguments or invalid property assignment
    Last edited by Wskip49; 10-27-2020 at 01:14 PM.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,858

    Re: VBA error copying and pasting to sheet

    Please read the yellow banner at the top of this page on how to attach a file. This will allow us to work with your sample file to determine the issue.

  6. #6
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    392

    Re: VBA error copying and pasting to sheet

    Here a copy of the workbook.
    Attached Files Attached Files

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,858

    Re: VBA error copying and pasting to sheet

    Cannot determine issue. Asking for additional help.

  8. #8
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: VBA error copying and pasting to sheet

    try...
    Please Login or Register  to view this content.

  9. #9
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: VBA error copying and pasting to sheet

    Isn't the issue that you can't copy multiple ranges?

  10. #10
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: VBA error copying and pasting to sheet

    I think the problem is the shape of the total range you're trying to copy. You'll need to copy it in separate operations and paste to the relevant locations on the target sheet.
    Rory

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. copying/pasting table with formulas - #ref error
    By imazack97 in forum Excel General
    Replies: 4
    Last Post: 11-19-2019, 09:03 AM
  2. [SOLVED] Error when copying and pasting a pivot table
    By chrisellis250 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-24-2019, 12:48 PM
  3. Runtime Error - Type Mismatch when copying and pasting cells in sheet with macros
    By lhickerson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-18-2014, 01:25 PM
  4. Copying & pasting a current region to another sheet w/o actually copying.....
    By Excel_vba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-15-2014, 09:08 PM
  5. Runtime error 1004 when copying & pasting data to another sheet
    By luneke1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2014, 06:04 PM
  6. ERROR 400 while copying and pasting a row with time serial
    By Sarangsood in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-12-2011, 08:03 AM
  7. Error when copying and pasting fields with validation
    By kristina in forum Excel General
    Replies: 12
    Last Post: 02-26-2009, 11:32 AM

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