Hiding Columns with Merged Cells
Mark,
I've taken your advice about the .Select but am still having problems.
Below is a snippet of my code. Please advise if there is anything I can do
to correct this.
Thanks!
Randy
Select Case ProjectSize
Case Is = "s"
Columns("G:H").EntireColumn.Hidden = True
"Mark Dullingham" wrote:
It is the Select method that is causing you the problem.
Shorten the code by taking out the .Select and it will work fine -
Columns("D:D").EntireColumn.Hidden = True
Hope this helps
Mark
"Steve Pollack" wrote:
I would like to include instructions in a macro to hide a column.
Part of the column contains merged cells.
When I record a macro for the process I want, the instructions read:
Columns("D:D").Select
Selection.EntireColumn.Hidden = True
However, when these instructions are incorporated into my macro both columns
D and E (due to the merged cells) are hidden.
Any help would be appreciated.
Thanks.
|