+ Reply to Thread
Results 1 to 5 of 5

Copy and paste values and number formats pastes formatting

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    AR
    MS-Off Ver
    Excel 2007
    Posts
    2

    Copy and paste values and number formats pastes formatting

    Hello, I made a macro that prints a formula sheet from a more complex information sheet. Most everything works except the Selection.PasteSpecial script leaves the source formatting. The script is below. I tried altering the "Selection.PasteSpecial Paste:=xlNumberFormats, Operation:= _xlNone, SkipBlanks:=False, Transpose:=False" line by making two lines, one for values and the other for number formats. This lead to another error.

    Sheets("Version 1").Select
    Range("A7:J78").Select
    Selection.Copy
    Sheets("Kitchen Print").Select
    Range("A7").Select
    ActiveSheet.Paste
    Selection.PasteSpecial Paste:=xlNumberFormats, Operation:= _
    xlNone, SkipBlanks:=False, Transpose:=False
    Range("G6:G57").Select
    Application.CutCopyMode = False

    Any help would be greatly appreciated.
    Last edited by Canthandlemyhandle; 12-27-2012 at 06:21 PM.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy and paste values and number formats pastes formatting

    Try this one

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Copy and paste values and number formats pastes formatting

    Or:
    Please Login or Register  to view this content.
    Kind regards, Harry.

  4. #4
    Registered User
    Join Date
    10-19-2012
    Location
    AR
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Copy and paste values and number formats pastes formatting

    Great!! Thank you all for your help. The problem has been fixed.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Copy and paste values and number formats pastes formatting

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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