+ Reply to Thread
Results 1 to 5 of 5

paste problem

  1. #1
    Shawn
    Guest

    paste problem

    Why does this code work:

    Sheets("CDPSD").Range("E1:E79").Copy
    Sheets("CDPTR").Range("A2").PasteSpecial
    Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True

    and this one not:?

    Sheets("CDPSD").Range("B1:B363").Copy
    Sheets("CDPTS").Range("A2").PasteSpecial Paste:=xlValues,
    Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True


    The 2nd code generates an error that says it can't paste becuase the
    destination is not the same size? Why does it work once and not later? How
    can I fix this?


    --
    Thanks
    Shawn

  2. #2
    Kevin Vaughn
    Guest

    RE: paste problem

    Well, it appears to me, you are trying to transpose more than 256 columns
    into a spreadsheet that can only handle 256 columns (until Excel 12.)

    --
    Kevin Vaughn


    "Shawn" wrote:

    > Why does this code work:
    >
    > Sheets("CDPSD").Range("E1:E79").Copy
    > Sheets("CDPTR").Range("A2").PasteSpecial
    > Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    > False, Transpose:=True
    >
    > and this one not:?
    >
    > Sheets("CDPSD").Range("B1:B363").Copy
    > Sheets("CDPTS").Range("A2").PasteSpecial Paste:=xlValues,
    > Operation:=xlNone, SkipBlanks:= _
    > False, Transpose:=True
    >
    >
    > The 2nd code generates an error that says it can't paste becuase the
    > destination is not the same size? Why does it work once and not later? How
    > can I fix this?
    >
    >
    > --
    > Thanks
    > Shawn


  3. #3
    Kevin Vaughn
    Guest

    RE: paste problem

    r/transpose more/transpose to more

    The below should read transpose to more than 256 columns, not transpose more
    than 256 columns (but you knew what I meant, didn't you?)

    --
    Kevin Vaughn


    "Kevin Vaughn" wrote:

    > Well, it appears to me, you are trying to transpose more than 256 columns
    > into a spreadsheet that can only handle 256 columns (until Excel 12.)
    >
    > --
    > Kevin Vaughn
    >
    >
    > "Shawn" wrote:
    >
    > > Why does this code work:
    > >
    > > Sheets("CDPSD").Range("E1:E79").Copy
    > > Sheets("CDPTR").Range("A2").PasteSpecial
    > > Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    > > False, Transpose:=True
    > >
    > > and this one not:?
    > >
    > > Sheets("CDPSD").Range("B1:B363").Copy
    > > Sheets("CDPTS").Range("A2").PasteSpecial Paste:=xlValues,
    > > Operation:=xlNone, SkipBlanks:= _
    > > False, Transpose:=True
    > >
    > >
    > > The 2nd code generates an error that says it can't paste becuase the
    > > destination is not the same size? Why does it work once and not later? How
    > > can I fix this?
    > >
    > >
    > > --
    > > Thanks
    > > Shawn


  4. #4
    Shawn
    Guest

    RE: paste problem

    So I was. I didn't need that many cells anyway so this was an easy fix.
    Thanks for the pointer. Sometimes when you have worked on something all day,
    you just can't see the simple stuff.
    --
    Thanks
    Shawn


    "Kevin Vaughn" wrote:

    > Well, it appears to me, you are trying to transpose more than 256 columns
    > into a spreadsheet that can only handle 256 columns (until Excel 12.)
    >
    > --
    > Kevin Vaughn
    >
    >
    > "Shawn" wrote:
    >
    > > Why does this code work:
    > >
    > > Sheets("CDPSD").Range("E1:E79").Copy
    > > Sheets("CDPTR").Range("A2").PasteSpecial
    > > Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    > > False, Transpose:=True
    > >
    > > and this one not:?
    > >
    > > Sheets("CDPSD").Range("B1:B363").Copy
    > > Sheets("CDPTS").Range("A2").PasteSpecial Paste:=xlValues,
    > > Operation:=xlNone, SkipBlanks:= _
    > > False, Transpose:=True
    > >
    > >
    > > The 2nd code generates an error that says it can't paste becuase the
    > > destination is not the same size? Why does it work once and not later? How
    > > can I fix this?
    > >
    > >
    > > --
    > > Thanks
    > > Shawn


  5. #5
    Kevin Vaughn
    Guest

    RE: paste problem

    You're welcome. I just happened to notice it while reading your message.
    Glad it helped.
    --
    Kevin Vaughn


    "Shawn" wrote:

    > So I was. I didn't need that many cells anyway so this was an easy fix.
    > Thanks for the pointer. Sometimes when you have worked on something all day,
    > you just can't see the simple stuff.
    > --
    > Thanks
    > Shawn
    >
    >
    > "Kevin Vaughn" wrote:
    >
    > > Well, it appears to me, you are trying to transpose more than 256 columns
    > > into a spreadsheet that can only handle 256 columns (until Excel 12.)
    > >
    > > --
    > > Kevin Vaughn
    > >
    > >
    > > "Shawn" wrote:
    > >
    > > > Why does this code work:
    > > >
    > > > Sheets("CDPSD").Range("E1:E79").Copy
    > > > Sheets("CDPTR").Range("A2").PasteSpecial
    > > > Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    > > > False, Transpose:=True
    > > >
    > > > and this one not:?
    > > >
    > > > Sheets("CDPSD").Range("B1:B363").Copy
    > > > Sheets("CDPTS").Range("A2").PasteSpecial Paste:=xlValues,
    > > > Operation:=xlNone, SkipBlanks:= _
    > > > False, Transpose:=True
    > > >
    > > >
    > > > The 2nd code generates an error that says it can't paste becuase the
    > > > destination is not the same size? Why does it work once and not later? How
    > > > can I fix this?
    > > >
    > > >
    > > > --
    > > > Thanks
    > > > Shawn


+ 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