Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: PasteSpecial

  1. #1
    New Member
    Join Date
    Mar 2002
    Location
    Paul
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi all,

    I want to copy from one workbook and paste special "column widths" and "values" into another workbook. My crude code currently reads:

    Range("A8:M48").Select
    Selection.Copy
    Windows("Book1").Activate
    Sheets("Sheet3").Select
    ActiveSheet.PasteSpecial_
    Paste:=xlColumnWidths
    ActiveSheet.PasteSpecial Paste:=xlValues

    Anybody tell me where I'm going wrong?

    As always, patience and help much appreciated!

    Cheers - Paul

  2. #2
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Select the cell to paste to 1st
    eg [A1].pastespecial paste:=8

    NB: Don't USE paste:=xlcolumnwidths

    Use the Constant 8 or Define the xlwidths
    as;

    Const Xlcolumnwidths = 8


    Kind Regards,
    Ivan F Moala From the City of Sails

  3. #3
    New Member
    Join Date
    Mar 2002
    Location
    Paul
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks a lot Ivan.

    What's the constant for paste special "values"?

    Cheers - Paul

  4. #4
    New Member
    Join Date
    Mar 2002
    Location
    Paul
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


  5. #5
    New Member
    Join Date
    Mar 2002
    Location
    Paul
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Being stupid - constant just follows tab order in Paste Special box!!

    Problem resolved - Many Thanks

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •