D
davegb
I'm working on a set of worksheets in a workbook where I want to use a
macro to Hide certain columns before I protect them send them out to
end users. The starting column that I want to hide varies, depending on
how many columns of data there are in that particular sheet. On every
sheet, however, the columns I want to hide start with one that has the
text "Top 10" in the third row. The hidden columns end at Column AC in
all sheets.
My current thinking is to write a macro that selects row 3 and finds
the work "Top". Set the column as a variable "TopCol", then have XL
hide all columns from that column to Column AC. But I can't figure out
how to tell XL I want to select all columns from a variable, TopCol, to
a constant "AC". I know how to do ("AA:AC"), but what is the syntax
when one of the column identifiers is a variable, the other the normal
alpha label?
macro to Hide certain columns before I protect them send them out to
end users. The starting column that I want to hide varies, depending on
how many columns of data there are in that particular sheet. On every
sheet, however, the columns I want to hide start with one that has the
text "Top 10" in the third row. The hidden columns end at Column AC in
all sheets.
My current thinking is to write a macro that selects row 3 and finds
the work "Top". Set the column as a variable "TopCol", then have XL
hide all columns from that column to Column AC. But I can't figure out
how to tell XL I want to select all columns from a variable, TopCol, to
a constant "AC". I know how to do ("AA:AC"), but what is the syntax
when one of the column identifiers is a variable, the other the normal
alpha label?