+ Reply to Thread
Results 1 to 8 of 8

Copy limitation to 255 characters - problem

  1. #1
    Registered User
    Join Date
    01-23-2020
    Location
    Bielsko-B, Poland
    MS-Off Ver
    MS Office 2013 Pro
    Posts
    9

    Copy limitation to 255 characters - problem

    This is my first post, so I would like to welcome everyone .
    I have a problem with VBA code copying text to the selected cell on another sheet.
    If the selected text contains 255 characters or less, everything is fine, but if the text contains more than 255 characters, the application displays a prompt containing the error text: Runtime Error 13; type mismatch.
    Unfortunately I don't know why . I am asking for help in clarifying this problem and finding the right solution.
    I add a file called example.xlsm presents this problem.
    Attached Files Attached Files

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Copy limitation to 255 characters - problem

    Hi,

    **Post Changed**

    It seems there is a limit of 255 characters for replace.

    https://stackoverflow.com/questions/...place-function
    Last edited by NeedForExcel; 01-29-2020 at 05:42 AM.
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    01-23-2020
    Location
    Bielsko-B, Poland
    MS-Off Ver
    MS Office 2013 Pro
    Posts
    9

    Re: Copy limitation to 255 characters - problem

    Thank you for your interest but I’m not enough good in VBA so I'm afraid I can't do it myself: (.
    Could you help me to change VBA code in a correct way so that mor than 255 characters be acceptable ?
    This is a VBA code from my example:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Copy limitation to 255 characters - problem

    Hi,

    Can you tell me what the code is supposed to do? I will code it accordingly..

  5. #5
    Registered User
    Join Date
    01-23-2020
    Location
    Bielsko-B, Poland
    MS-Off Ver
    MS Office 2013 Pro
    Posts
    9

    Re: Copy limitation to 255 characters - problem

    I will try to explain you working VBA code in a short form.
    If I mark check box (range D1 – D4 in sheet named “Arkusz2”) the correct text (range B1 – B4) is copied to cell B44 in sheet named “Arkusz1”).
    For example, I mark check box D1 end next the text from B1 (now is 255 characters) is copied to cell B44 in sheet named “Arkusz1” correctly. However if change contents B1 adding one or more characters to the text (it wil be more than 255 characters) and once again mark check box D1 next shows up a prompt containing the error text: Runtime Error 13; type mismatch.
    Please look at an attached example.xlsm. I’m sure everything will be clear for you.
    Last edited by Ted1104; 01-29-2020 at 09:15 AM. Reason: fix

  6. #6
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,004

    Re: Copy limitation to 255 characters - problem

    It isn't clear to me what you're trying to do, but maybe this:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-23-2020
    Location
    Bielsko-B, Poland
    MS-Off Ver
    MS Office 2013 Pro
    Posts
    9

    Re: Copy limitation to 255 characters - problem

    Hi,
    Thank you for interest in my problem. Your solution is exactly what I mean . I’d like to explain, that this is only small part of bigger project used in my work. Once again thanks , good job !

  8. #8
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,004

    Re: Copy limitation to 255 characters - problem

    You're welcome, glad to help, & thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 08-10-2017, 04:21 AM
  2. [SOLVED] Problem matching first 3 characters against first 3 characters
    By dceremuga in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-02-2017, 11:00 AM
  3. [SOLVED] Automatic limitation of the number of Characters in cells
    By george.m in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2017, 05:30 AM
  4. Range.Copy limitation issue (1004 application-defined or object-defined error)
    By macro_student in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2016, 10:21 AM
  5. Vlookup strange problem- limitation?
    By aborg88 in forum Excel General
    Replies: 5
    Last Post: 02-07-2012, 05:34 AM
  6. VLOOKUP Problem (limitation)?
    By SnotRockit in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-07-2005, 11:06 AM
  7. Memory problem or Excel limitation
    By Jac Tremblay in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-23-2005, 10:06 PM

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