• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

Excel VBA - Defining table based on CurrentCell.ActiveRegion

What is the cleanest way to define a range that is the current region without the top row?
If I start with ActiveCell.CurrentRegion, how do I set rTableSansTopRow (below)?

Set rWholeTable=ActiveCell.CurrentRegion

Set rTableSansTopRow=[code???]

Thanks, --Andres
0
AndresHernando
Asked:
AndresHernando
1 Solution
 
Rory ArchibaldCommented:
You could use:
With rWholeTable
Set rTableSansTopRow = .resize(.rows.count - 1).Offset(1)
End With

Open in new window

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now