Prog. Hide range and indiv. columns?

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

Guest

Is it possible to hide a range of columns programatically as well as
additional free floating columns elswhere on the work sheet.

For instance, this hides a range::

Columns("C:N").Select
Selection.EntireColumn.Hidden = True

But, what I really want to achieve is this:

Columns("C:N, P, Y, W").Select
Selection.EntireColumn.Hidden = True

....Of course, this throws up an error...is there a way to rephrase this code
to make it do what I want?

Many thanks
Jason

Excel 2000
 
Hi Jason,

Range("C:N,P:P,Y:Y,W:W").EntireColumn.Hidden = True


--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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