+ Reply to Thread
Results 1 to 4 of 4

VBA compile error on simple copy-paste special

Hybrid View

DJDRU VBA compile error on simple... 02-10-2017, 11:19 AM
xlnitwit Re: VBA compile error on... 02-10-2017, 11:28 AM
DJDRU Re: VBA compile error on... 02-10-2017, 11:56 AM
xlnitwit Re: VBA compile error on... 02-10-2017, 12:42 PM
  1. #1
    Registered User
    Join Date
    02-18-2014
    Location
    Tampa
    MS-Off Ver
    Excel 2010
    Posts
    54

    VBA compile error on simple copy-paste special

    Hello,

    I am not understanding why this error is occurring or how to correct it. The macro was recorded and when run through VBA it returns an error. I have attached a screenshot below. Any help is greatly appreciated.
    Attached Images Attached Images

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: VBA compile error on simple copy-paste special

    Hi,

    Don't select, it merely slows the code down. Use
    Range().Copy
    Range().Pastespecial ...
    If you'd pasted the code instead of a picture I would have edited it for you.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    02-18-2014
    Location
    Tampa
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: VBA compile error on simple copy-paste special

    Thank you very much. This fixed it, but I'm still stuck on why this would happen.

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: VBA compile error on simple copy-paste special

    It would seem that the Selection was not a range for some reason.

+ 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. [SOLVED] [Simple] Paste special macro (I already have most of the code)?
    By agalloch123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-11-2015, 04:54 PM
  2. [SOLVED] Compile Error: Invalid Use of Property on stupidly simple code
    By QueeniePie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2013, 11:41 AM
  3. [SOLVED] Runtime Error 13 for simple copy/paste loop
    By Tbenefits in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-02-2013, 03:15 PM
  4. [SOLVED] Simple copy and paste macro- Paste special help needed.
    By hernancrespo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2012, 07:02 AM
  5. compile error on simple End.xldown code
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-23-2010, 09:06 AM
  6. Compile error in copy/paste code
    By carbonboywonder in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2010, 07:46 AM
  7. Replies: 1
    Last Post: 05-28-2010, 09:05 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