Trying to select the visible range of cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to select a visible range of cells within a certain selection, but I'm getting a lot of errors.
Also, I need to allow for when the selection already contains visible cells only. My failing code is:

Range(strTitleRange).VisibleRange.Select

Could you please supply your example code to fix these issues?

TIA
 
VisibleRange pertains to what can be seen on the screen and is a property of
the window object, not the range object.

Dim rng as Range
set rng = Intersect(Range(strTitleRange),Activewindow.VisibleRange)
if not rng is nothing then
rng.Select
End if

--
Regards,
Tom Ogilvy

Selector said:
I am trying to select a visible range of cells within a certain selection,
but I'm getting a lot of errors.
Also, I need to allow for when the selection already contains visible
cells only. My failing code is:
 
Back
Top