+ Reply to Thread
Results 1 to 3 of 3

syntax Error paste Special Values

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,739

    syntax Error paste Special Values

    i have a macro to copy data from certain sheets and paste these into sheet2 onwards in the destination workbook


    the code worked well, but I tried to amend my code so that it pastes the data as values but get a syntax error

    Kindly amend my code .Copy after:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count).PasteSpecial Paste:=xlPasteValues


    Please Login or Register  to view this content.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: syntax Error paste Special Values

    PasteSpecial is a method of a Range object, not a Sheet. What you have copied is a sheet, so you can't pastespecial it anyway.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,739

    Re: syntax Error paste Special Values

    Thanks for letting me know

    I have written code to range value all the sheets after after importing the data

+ 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. Runtime error '1004': Paste special method of range class error.
    By Daryl Zer0 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-05-2014, 01:44 AM
  2. copy formula and paste for new data added and autofill.....and paste special values
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-13-2014, 07:40 AM
  3. [SOLVED] first timer using VB to cut and paste macro - getting compile error syntax error
    By jopedder in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-24-2013, 11:45 AM
  4. Replies: 2
    Last Post: 03-05-2013, 07:52 AM
  5. Replies: 1
    Last Post: 12-05-2012, 11:37 AM
  6. [SOLVED] Excel 2002 - Can only paste values, wont let me paste special
    By MK_Chopper_P in forum Excel General
    Replies: 2
    Last Post: 07-12-2012, 02:22 AM
  7. Paste Special Values Syntax
    By L. Howard Kittle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2006, 05:10 PM

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