+ Reply to Thread
Results 1 to 5 of 5

PasteSpecial Values

  1. #1
    Registered User
    Join Date
    03-25-2009
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    49

    PasteSpecial Values

    Hey!

    Have a small VBA code that simply copy a row and then paste it on first empty row in another sheet. Its working if i use a regular macro, but i have some problems to get it to work with some code. I want it as VBA since the copying is alot smoother.

    The problem i have in the code is the PasteSpecial.value, Since i dont want the formula to get pasted.

    Attachiing the worksheet. Its the macro PasteSpecial that i need alittle guiding on if possible.
    Attached Files Attached Files
    Last edited by Zheno; 02-14-2010 at 05:49 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Small PasteSpecial.Value with VBA help

    Your Sub TestDis does exactly what you want it to do. Using Copy with the Destination argument does not. What do you want to do in Sub PasteSpecial that you can't do in TestDis as written?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    03-25-2009
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Small PasteSpecial.Value with VBA help

    Quote Originally Posted by 6StringJazzer View Post
    Your Sub TestDis does exactly what you want it to do. Using Copy with the Destination argument does not. What do you want to do in Sub PasteSpecial that you can't do in TestDis as written?
    No because when i run it i get the message (translated from swedish) "Error no.'1004' Couldnt find the PasteSpecial property for the Range class"

    EDIT*

    Yes the TestDIS does what i want. When i run that macro tho it gets a delay and a jump between the diffrent workbooks. Witch im trying to avoid. The PasteSpecial code makes it smooth and no switching between the workbooks is done
    Last edited by Zheno; 02-14-2010 at 05:42 PM.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: PasteSpecial Values

    Hi,

    You can't use the Copy Destination:= construction with values. Instead try

    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    03-25-2009
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: PasteSpecial Values

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    You can't use the Copy Destination:= construction with values. Instead try

    Please Login or Register  to view this content.
    There we go!!!

    Awesome, Thank you.

+ 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