Results 1 to 7 of 7

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member
    Join Date
    Apr 2011
    Posts
    190
    Rep Power
    15
    I will do - sorry

  2. #2
    Senior Member
    Join Date
    Apr 2011
    Posts
    190
    Rep Power
    15
    Here is how I ended up dealing with issue - I keep track of the selected rows in a Listbox on a userform. From that userform I can then have access to an unlimited number of rows in my selection - than do the proper processing of my selected rows

    Code:
    Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
        Dim MyString() As String, MyString1() As String
        If Len(Selection.Address(False, False)) > 240 Then
            Astr = Selection.Address
            MyString = Split(Astr, ",")
            For i = 0 To UBound(MyString) - 1
                MyString1 = Split(MyString(i), ":")
                If MyString1(0) <> MyString1(1) Then
                        FormSlt.LBrowsSlt.AddItem MyString1(0) & "-" & MyString1(1)
                    Else
                        FormSlt.LBrowsSlt.AddItem MyString1(0)
                End If
                ActiveSheet.Range(MyString(UBound(MyString))).Select
            Next i
        End If
    End Sub

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
  •