A
Arne Hegefors
I try to make a union of two ranges but I cannot get it to work. I write the
code like this:
Set rngForbiddenSearchRange = Union(Range(searchRange1), Range(searchRange))
where I previously have defined:
Dim searchRange1 As Range
Set searchRange1 = Range(Cells(segment.Row, 1), Cells(segment.Row, 100))
and in another sub i have:
Dim searchRange As Range
Set searchRange = Range(Cells(secID.Row, 1), Cells(secID.Row, 100))
and I pass the searchRange along to the sub where I try to do the union.
Please I cannot see what is wrong here! I really would appreciate any help!
thanks alot!
code like this:
Set rngForbiddenSearchRange = Union(Range(searchRange1), Range(searchRange))
where I previously have defined:
Dim searchRange1 As Range
Set searchRange1 = Range(Cells(segment.Row, 1), Cells(segment.Row, 100))
and in another sub i have:
Dim searchRange As Range
Set searchRange = Range(Cells(secID.Row, 1), Cells(secID.Row, 100))
and I pass the searchRange along to the sub where I try to do the union.
Please I cannot see what is wrong here! I really would appreciate any help!
thanks alot!