Results 1 to 7 of 7

Thread: Get Range Address When Length Of Address Greater than 251 / 255

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member
    Join Date
    Apr 2011
    Posts
    190
    Rep Power
    14

    Get Range Address When Length Of Address Greater than 251 / 255

    I am trying to capture a

    Selection.Address property

    That is longer than 255 characters - So the user selects rows using the mouse (shift+click & Ctrl+click).
    When the user is done selecting the rows - I have a userform with actions - i.e. exporting the selected rows.

    BUT - the Selection.address stops changing at around 251 characters (I added a label that displays the value and the length) - any suggestions how I can trap the selections into and array or something - so the user can make a selection that is any length.

    My main objective is to allow the user to select any number of rows - then select the type action he wants to do with the selection - i.e. Export of data or charting. So if anybody has other suggestions - it is much appreciated.



    Code:
    Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
        If Len(Selection.Address) > 251 Then
            MsgBox "How to deal with this"
        End If
    end usb

    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 07-07-2023 at 01:14 PM.

Similar Threads

  1. Replace Pivot Table Source Range with New Address VBA
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 1
    Last Post: 04-25-2013, 07:51 PM
  2. Indirect Address Column Formula help needed
    By trankim in forum Excel Help
    Replies: 4
    Last Post: 10-13-2012, 02:15 PM
  3. Replies: 10
    Last Post: 04-07-2012, 05:33 AM
  4. Get last Filled Cell address in a Range.
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 3
    Last Post: 03-24-2012, 01:08 AM
  5. Using Selection.Address
    By Rasm in forum Excel Help
    Replies: 1
    Last Post: 11-28-2011, 05:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •