RefersToRange Property Example

This example displays the number of rows and columns in the print area on the active worksheet.

p = Names("Print_Area").RefersToRange.Value
MsgBox "Print_Area: " & UBound(p, 1) & " rows, " & _
    UBound(p, 2) & " columns"