Consulting

Results 1 to 3 of 3

Thread: Range and Selection question

  1. #1
    VBAX Expert
    Joined
    Aug 2004
    Posts
    810
    Location

    Range and Selection question

    How do I find out how many Columns and Rows in a Selection (the dimension of that Range) in VBA?

    Thanks

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Selection.Rows.Count
    Selection.Columns.Count

  3. #3
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Also if you want to know the first row/column:

    Selection(1, 1).Row
     Selection(1, 1).Column

Posting Permissions

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