Consulting

Results 1 to 1 of 1

Thread: Last cell in range

  1. #1
    VBAX Regular
    Joined
    Jan 2011
    Posts
    55
    Location

    Last cell in range

    Dear Forum

    I want to pass a given range first/last row without inbox message, for this I am refereing to the belw MSD page but its not wotking, PLZ let me know the correct form

    I am attaching the excelsheet for your reference,
    Attachment 7257


    http://msdn.microsoft.com/en-us/libr...ice.12%29.aspx

    Then add this code.
    VB


    [VBA]
    With mybook.Worksheets(1)
    FirstCell = "A2"
    Set sourceRange = .Range(FirstCell & ":" & RDB_Last(3, .Cells))
    ' Test if the row of the last cell is equal to or greater than the row of the first cell.
    If RDB_Last(1, .Cells) < .Range(FirstCell).Row Then
    Set sourceRange = Nothing
    End If
    End With [/VBA]
    Attached Files Attached Files
    Last edited by Bob Phillips; 01-22-2012 at 10:43 AM. Reason: Added VBA tags

Posting Permissions

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