+ Reply to Thread
Results 1 to 3 of 3

Copy/Paste only values

  1. #1
    Registered User
    Join Date
    09-03-2004
    Posts
    9

    Copy/Paste only values

    Hey guys,

    How do I copy and paste values only in VBA using the .Copy method?

    My current code is listed below, but it does a normal copy/paste:
    Please Login or Register  to view this content.
    Thanks!

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Copy/Paste only values

    To do that you need to break it into two lines like this:

    Please Login or Register  to view this content.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Copy/Paste only values

    Hello Session101,

    You can do this two different ways. First, you can modify your copy statement to use PasteSpecial.
    Please Login or Register  to view this content.
    The second way is by direct assignment. This method only works with the Value property. Eventhough the Value property is the default property for a Range, you still must specify the property for the block transfer to work.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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