+ Reply to Thread
Results 1 to 5 of 5

How to get past Excel's limit of 255 characters with ActiveSheet.Range().Select

  1. #1
    Registered User
    Join Date
    05-25-2016
    Location
    MD
    MS-Off Ver
    2013
    Posts
    5

    How to get past Excel's limit of 255 characters with ActiveSheet.Range().Select

    I have added individual cells to a textbox as MS recommends, but when I try the code below with tbxLongString holding a 565 character string in it, the function still fails?

    https://support.microsoft.com/en-us/kb/213841

    What am I doing wrong?

    ActiveSheet.Range("tbxLongString").Select

  2. #2
    Forum Contributor
    Join Date
    08-23-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: How to get past Excel's limit of 255 characters with ActiveSheet.Range().Select

    Hello,

    So as i understand it, your tbxLongString is longer than the maximum allowed, at 565 characters and this is preventing you from passing it into a range.select statement?

    Firstly, to select the range you should just have to do: tbxlongstring.select, when i try to select a range object using the range().select i get an error.

    ** Edit: I just realised that tbxLongString is probably a string at the moment. You would need to convert it to a range, and THEN say ThatRange.select

    Without knowing what your actual string is, I couldn't even begin to offer help on how to convert it **
    Last edited by jayherring86; 05-27-2016 at 04:33 PM.
    IF("helping me", "thanks", "need more detail?")

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,700

    Re: How to get past Excel's limit of 255 characters with ActiveSheet.Range().Select

    If tbxLongString is defined (Dimmed) as a String, or is the value in a Text Box, (that is, string text) then this:

    Please Login or Register  to view this content.
    should probably be this:
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How to get past Excel's limit of 255 characters with ActiveSheet.Range().Select

    Do you just want a function that returns a range for a long range string?
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How to get past Excel's limit of 255 characters with ActiveSheet.Range().Select

    The forum isn't cooperating. The attachment contains a demo procedure that creates a 5,000-character range string listing 1300 non-contiguous cells, and the FastUnion function returns a range.
    Attached Files Attached Files
    Last edited by shg; 05-28-2016 at 06:37 PM.

+ 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. [SOLVED] How to limit characters in a .Range command?
    By kbackous in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-05-2013, 12:51 PM
  2. Pop Up to select the range and past to another sheet.
    By himanshug in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-18-2012, 03:10 AM
  3. [SOLVED] select & copy some range and past it to another sheet with sum
    By pedjvak in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-01-2012, 12:24 AM
  4. Replies: 1
    Last Post: 01-13-2011, 02:29 PM
  5. How to limit characters in a single excel cell ?
    By LaserDance in forum Excel General
    Replies: 2
    Last Post: 07-01-2010, 12:38 PM
  6. [SOLVED] Can excel limit the characters in a cell to 28 automatically?
    By Tom in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-02-2006, 12:30 PM
  7. Limit characters in a word/text box in excel
    By Alex Martinez in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2005, 01:05 AM
  8. [SOLVED] How do I name a picture as I paste it from VBA? (ActiveSheet.Past.
    By Leitey in forum Excel General
    Replies: 2
    Last Post: 07-05-2005, 05:05 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