+ Reply to Thread
Results 1 to 6 of 6

Copy and Paste VBA code error

  1. #1
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    Copy and Paste VBA code error

    The following code shows error, trying to change two lines code into one for faster execution.

    Please Login or Register  to view this content.
    Please help me to correct this.

  2. #2
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Copy and Paste VBA code error

    Hello Gan_xl,

    Try putting this part:-

    Please Login or Register  to view this content.
    onto the next line.

    Cheerio,
    vcoolio.

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Copy and Paste VBA code error

    Try this
    Please Login or Register  to view this content.
    Note that the quotation in your post is not correct .. It would be " not “
    In one line you would not use PasteSpecial
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Copy and Paste VBA code error

    Hi gan_xl,

    Note: at single line Pastespecial will not work , if you want to paste special value then that line should be at next line then only it will work.

    Please Login or Register  to view this content.
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  5. #5
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    Re: Copy and Paste VBA code error

    Thanks everybody for taking time to respond me. I am already using 2 lines code and expecting one line code. But now I understand it is not possible. Thanks again.

  6. #6
    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: Copy and Paste VBA code error

    Hi,

    You don't need to copy for this.
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

+ 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] Paste restriction code in vba not affecting GUI copy/paste only Ctrl+V
    By DT211569x in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-25-2016, 01:28 PM
  2. VBA Code Error when I copy and paste from another workbook
    By madison121 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2015, 05:31 PM
  3. Copy paste value - Macro code error
    By Dial1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2014, 05:27 PM
  4. Macro Code Copy Paste Error
    By FLani in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-21-2013, 10:54 PM
  5. Copy paste code error
    By shaukat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2011, 05:12 PM
  6. Error on code to copy and paste user selection.
    By leaning in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-03-2011, 10:52 AM
  7. Compile error in copy/paste code
    By carbonboywonder in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2010, 07:46 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