I would like to use an empty range as follows:
Set NewRange = Union(EmptyRange, SomeRange)
I tried to set EmptyRangeas an empty range using Nothing, Emptyand Null, but a "runtime error" 5 "Invalid call or procedure argument" occurs, does it seem like I should use an instruction Ifor is there another keyword that does the job?
I can use:
If EmptyRange Is Nothing Then
Set NewRange = SomeRange
Else
Set NewRange = Union(EmptyRange, SomeRange)
End If
instead of building:
Set NewRange = Union(EmptyRange, SomeRange)
source
share