![]() |
Prog. Hide range and indiv. columns?
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 |
Prog. Hide range and indiv. columns?
I use this kind of syntax:
Range("C:N,P:P,Y:Y,W:W").EntireColumn.Hidden = True wrote: 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 -- Dave Peterson |
Prog. Hide range and indiv. columns?
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) wrote in message ... 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 |
Prog. Hide range and indiv. columns?
Awesome thank you!
"Dave Peterson" wrote in message ... I use this kind of syntax: Range("C:N,P:P,Y:Y,W:W").EntireColumn.Hidden = True wrote: 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 -- Dave Peterson |
All times are GMT +1. The time now is 05:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com