none
COpy & Paste Special RRS feed

  • General discussion

  • Hi

    I want to copy range and  paste a special using different past special commands as below. is there a way there paste sepcil commands can be combined or do I need to just do these as shown?

    Rng.copy

    Range("B4").PasteSpecial Paste:=xlPasteValues

    Range("B4").PasteSpecial Paste:=xlPasteColumnWidths

    thanks

    Peter

    Friday, March 18, 2016 10:53 AM

All replies

  • is there a way there paste sepcil commands can be combined

    No. You can only combine commands that have a bit mask:

    00000001 = 1
    00000010 = 2
    00000100 = 4
    00001000 = 8
    etc.

    The first argument of PasteSpecial is Paste as XlPasteType and if you look at the values of the constants you can see that they don't have values that are bit masks.

    A positive example is attributes used as argument on SetAttr, this constants have a bit mask, means you can set more then one file attribute at a time.

    Andreas.

    Friday, March 18, 2016 3:01 PM
  • thanks Andreas
    Friday, March 18, 2016 3:38 PM
  • I'm confused why people who get perfect answers to their questions do not mark the solution as an answer ....


    Best regards George

    Friday, March 18, 2016 4:57 PM
  • Andreas

    For some reason there is no option to mark as answer - as there usually is.

    You know I am always grateful for you contributions and will mark as aswer as soon as the option is available.

    many thanks 

    Peter

    Sunday, March 20, 2016 11:15 AM
  • Hi Py1

    You won't get the "Answered" button because your post is not a question, it's a Discussion.

    When you start and press the "ASK QUESTION" on the top left, the second screen that opens, you can select "Ask Question" or "Start a Discussion", on the top , yours is Start a Discussion.

    Now just a Moderator can change that.

    If you look at the Icon on your post, it's  two "Callouts" when it's a question, it's a "Question Mark" that you can see on other post.

    It's a good thing  to mark the post "ANSWERED" when they are.

    Regards

    John


    Cimjet

    Sunday, March 20, 2016 12:04 PM
  • John

    Apologies for my delay in responding.

    Thanks for this clarification - I obviously started a discussion without realizing it!

    I will need to pay more attention when I next ask a question and make sure I get it right.

    kind regards,

    Peter

    Wednesday, March 23, 2016 11:47 AM
  • You're welcome.

    No apologies needed, thanks for the feedback.

    John


    Cimjet

    Thursday, March 24, 2016 12:24 PM