Consulting

Results 1 to 4 of 4

Thread: Get entire worksheet range

  1. #1

    Get entire worksheet range

    I would like to programmatically get the range for the enitre active worksheet. Manually I can see it is ("A1:IR65523") but how do I get it programmatically

    Thanks

    Chris

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Set rng = Activesheet.Usedrange
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Great, that solved the problem.

    How come when i type "ActiveSheet." intisence does not show anything in my vba editor?

    Chris

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Activesheet is an instance of Sheet, which can be a Worksheet, it can be a Chart, etc. Only worksheets have UsedsRange, so it won't show as a property of Sheet.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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