+ Reply to Thread
Results 1 to 3 of 3

Excell cuts string when copying

  1. #1
    Registered User
    Join Date
    08-04-2005
    Posts
    1

    Excell cuts string when copying

    Hi All
    I have problem with copy paste using VBA.

    I have a worksheet and its filled with some data. There is also a button that creates another worksheet ad copy some range to the new worksheet

    I am using the following code :

    Dim objExcel As Excel.Application
    Set objExcel = CreateObject("Excel.Application")
    objExcel.Workbooks.Add
    objExcel.Visible = False
    Worksheets("AD Request Form").Range("A1:W12").Copy
    objExcel.Range("A1:W12").PasteSpecial (xlPasteValues)


    The problem is that in some cells there is a lot of text.
    After copy paste in the new worksheet all strings are being cut to 255 char

    Is there some workarround
    Plz help it is very important to me


    BR,
    Krzysztof

  2. #2
    Jim Rech
    Guest

    Re: Excell cuts string when copying

    Why are you creating another instance of Excel? Just use the current
    instance and the text will not be truncated.

    --
    Jim
    "temp_for_oracle"
    <temp_for_oracle.1t8qqj_1123160773.4379@excelforum-nospam.com> wrote in
    message news:temp_for_oracle.1t8qqj_1123160773.4379@excelforum-nospam.com...
    |
    | Hi All
    | I have problem with copy paste using VBA.
    |
    | I have a worksheet and its filled with some data. There is also a
    | button that creates another worksheet ad copy some range to the new
    | worksheet
    |
    | I am using the following code :
    |
    | Dim objExcel As Excel.Application
    | Set objExcel = CreateObject("Excel.Application")
    | objExcel.Workbooks.Add
    | objExcel.Visible = False
    | Worksheets("AD Request Form").Range("A1:W12").Copy
    | objExcel.Range("A1:W12").PasteSpecial (xlPasteValues)
    |
    |
    | The problem is that in some cells there is a lot of text.
    | After copy paste in the new worksheet all strings are being cut to 255
    | char
    |
    | Is there some workarround
    | Plz help it is very important to me
    |
    |
    | BR,
    | Krzysztof
    |
    |
    | --
    | temp_for_oracle
    | ------------------------------------------------------------------------
    | temp_for_oracle's Profile:
    http://www.excelforum.com/member.php...o&userid=25912
    | View this thread: http://www.excelforum.com/showthread...hreadid=392881
    |



  3. #3
    Forum Contributor
    Join Date
    06-02-2005
    Location
    India
    MS-Off Ver
    2007
    Posts
    138

    Thumbs up

    Try this...

    Please Login or Register  to view this content.
    Enjoy Excelling!!!
    ilyas...
    Last edited by ilyaskazi; 08-04-2005 at 11:17 AM.

+ 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