hide certain columns in all sheets

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

exelerator

Thread Starter
Joined
Dec 13, 2011
Messages
13
I have multiple (80 or so) sheets were I what to hide certain columns say I:N on all sheets not just the active sheet with out a very length code! Can any1 help.

Sub hidealltest()
Dim ws As Worksheet
For Each ws In Sheets
Columns("I:N").Select
Selection.EntireColumn.Hidden = True
Next
End Sub

It only works on active sheet but highlights all columns to be hidden in sheet 2 and 3 but fails to hide them..:D
 

exelerator

Thread Starter
Joined
Dec 13, 2011
Messages
13
I posted in wrong place by mistake then it got moved after I made a new 1 sorry
 

valis

Moderator
Joined
Sep 24, 2004
Messages
78,131
merging duplicate, please do not create duplicate threads for the same issue.

thanks,

v
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top