Should probably be sufficient to avoid this by modifying getHeaderRangeAddress to LBLY and pre-fetch getHeaderRange and do a Nothing check on it before attempting the .Address(...) lookup.
Or, could EAFP by catching the RTE 91. Can't be sure it'll always be the same RTE on different Office versions/platforms, though -- kind of prefer the LBLY here.
In particular, an error is raised when the header output is enabled and an entire row or column is selected that does not intersect
.UsedRange
.getHeaderRange
returnsNothing
if called when an invalid selection has been made, becauseExportRange
gets set toNothing
.Should probably be sufficient to avoid this by modifying
getHeaderRangeAddress
to LBLY and pre-fetchgetHeaderRange
and do aNothing
check on it before attempting the.Address(...)
lookup.Or, could EAFP by catching the RTE 91. Can't be sure it'll always be the same RTE on different Office versions/platforms, though -- kind of prefer the LBLY here.