Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with Select Method

Status
Not open for further replies.

eAlchemist

Technical User
Aug 28, 2003
64
US

Is there something I don't know about successive select methods? The following code yields an unexpected (at least I don't expect it) result:

Sheet.Activate
Columns("A:X").Select
Selection.EntireColumn.Hidden = False

Do While ColumnsToHide(arraycount) <> "None"

Columns(ColumnsToHide(arraycount)).Select

If I ?Selection.Address in the immediates window here, I get $B:$X

Does this make sense to anyone? What am I doing wrong?

Thanks,
Chris
 
why bother with selections ??
There is avery good FAQ in the FAQs area on this

Your code can be re-written as:

Columns("A:X").EntireColumn.Hidden = False

Do While ColumnsToHide(arraycount) <> "None"

Columns(ColumnsToHide(arraycount)).Select



Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top