+ Reply to Thread
Results 1 to 8 of 8

Trying to Change this code to make it paste 'Values' only.

  1. #1
    Registered User
    Join Date
    01-23-2013
    Location
    Baltimore
    MS-Off Ver
    Excel 2010
    Posts
    4

    Trying to Change this code to make it paste 'Values' only.

    HI All - Very new to this forum and also vba. I don't know much, so I appreciate any help.

    I currently have this code. It copies and pastes data from a specific range that I've specified of multiple workbooks of a specific tab, into a master sheet. The data from each workbook is pasted directly under the information that it collected from the last workbook that was opened.

    It is currently pasting the formulas; however, I need it to paste values only. Can anyone edit this code to fix that? Other than this, it works perfectly.

    Thanks!

    Ron






    Please Login or Register  to view this content.
    Last edited by RWarczy; 01-23-2013 at 02:00 PM.

  2. #2
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,746

    Re: Trying to Change this code to make it paste 'Values' only.

    Hi Ron

    Please wrap your code in code tags. Go to your original post, Edit Post. Highlight the code, click the # sign, Save Changes.

    You need to make this a two liner to paste values
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    01-23-2013
    Location
    Baltimore
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Trying to Change this code to make it paste 'Values' only.

    Thanks! I made the change with marking the #. Can you tell me where I have to add those two lines? Or would you mind just placing it in where it needs to be? I honestly know nothing about how this works. Just winging it.

    Thanks again for the prompt response, I really appreciate it!!

  4. #4
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,746

    Re: Trying to Change this code to make it paste 'Values' only.

    Hi Ron

    Can't test this but, assuming your code works otherwise
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-23-2013
    Location
    Baltimore
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Trying to Change this code to make it paste 'Values' only.

    That one didn't work for some reason, but I saw where you input the rng.Copy and the second line that you sent, and plugged it into the original one that I had sent. It gave me an error, so I changed ws.Target to wsTarget on the line you sent and it worked like a charm!

    Thank you very very much!!!!

  6. #6
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,746

    Re: Trying to Change this code to make it paste 'Values' only.

    Hi Ron...yeah...those dots will get you every time...sorry about that...glad you worked through.

    You're welcome...glad I could help. Thanks for the Rep.

    If this resolves your issue please mark your Thread as SOLVED.

    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:
    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  7. #7
    Registered User
    Join Date
    01-23-2013
    Location
    Baltimore
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Trying to Change this code to make it paste 'Values' only.

    I don't even know how I figured out it was supposed to be there. I have no idea what that dot means.
    Just saw it somewhere else without it.

    Thanks again! Will mark as solved. Y/W on the rep!

  8. #8
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,746

    Re: Trying to Change this code to make it paste 'Values' only.

    Hi Ron

    Well, you were prescient enough that you realized your old code didn't have the dot...and it worked (not as you wished...but it worked). The new code DIDN'T work with the dot...you saw that...you fixed it. I'd say that a job well done.

+ 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