Selection vs Objects

  • Thread starter Thread starter Paul Smith
  • Start date Start date
P

Paul Smith

I am trying to unhide all the rows which are currently hidden using a
starting point as anchor to the test range.

Why does the code below not work?


Range(PosStart, PosStart.End(xlDown)).EntireRow.Hidden = False

Range(PosStart, PosStart.End(xlDown)).Select - selects the correct range

Selection.EntireRow.Hidden = False - unhides the required rows

When used together they achieve the desired effect, but why do I have to use
the selection object, why does it not seem to work when using just objects?

PWS
 
Paul,

It works for me: XL XP, Windows XP Pro.

Set PosStart = Range("B2")
Range(PosStart, PosStart.End(xlDown)).EntireRow.Hidden = False

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top