PDA

View Full Version : [SOLVED:] Hiding Columns



malik641
09-02-2005, 11:47 AM
I'm having a small problem hiding certain columns in a macro. If cells A1:C1 are merged, and you create a macro such as:


Sub Hide_Column()
Range("B:B").Select
Selection.EntireColumn.Hidden = True
End Sub

Then it will hide columns A:C and not JUST column B.

I'm working with Excel 2000, BTW.
How can I hide that one column with the merged cells without hiding the other columns?

Thanks in advance

Jacob Hilderbrand
09-02-2005, 11:53 AM
Try this:


Range("B:B").EntireColumn.Hidden = True

malik641
09-02-2005, 12:05 PM
Nice! Easy fix :thumb. I like those.

Thanks DRJ

Bob Phillips
09-02-2005, 12:24 PM
columns("B:B").hidden=true