ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide columns in a group on after VBA-procedure (https://www.excelbanter.com/excel-programming/333022-hide-columns-group-after-vba-procedure.html)

NorTor[_4_]

Hide columns in a group on after VBA-procedure
 
Hello!

A bit of help needed please...

On a reporting-sheet, I have selected some columns (F:J) and made them
into a group (using menus DATA-GROUP). Now the user can select whether
to view these columns by clicking the '+' symbol, and hide them again
by clicking the '-' symbol.

Now, the report is built by a VBA-procedure when the user clicks a
'Build Report' button.

I would like the the group to be hidden by default after the report is
built. The way it is now, the group is in the state the user left it
before building the report.

How do I add a line in the procedure so that the group/columns are
hidden?


Regards,
-NorTor-


Tom Ogilvy

Hide columns in a group on after VBA-procedure
 
Worksheets("Sheet2").Outline _
.ShowLevels columnLevels:=1

--
Regards,
Tom Ogilvy


"NorTor" wrote in message
...
Hello!

A bit of help needed please...

On a reporting-sheet, I have selected some columns (F:J) and made them
into a group (using menus DATA-GROUP). Now the user can select whether
to view these columns by clicking the '+' symbol, and hide them again
by clicking the '-' symbol.

Now, the report is built by a VBA-procedure when the user clicks a
'Build Report' button.

I would like the the group to be hidden by default after the report is
built. The way it is now, the group is in the state the user left it
before building the report.

How do I add a line in the procedure so that the group/columns are
hidden?


Regards,
-NorTor-




nortor

Hide columns in a group on after VBA-procedure
 
Thank you so much Tom, just what I needed!


Regards,
NorTor



On Tue, 28 Jun 2005 09:28:20 -0400, "Tom Ogilvy"
wrote:

Worksheets("Sheet2").Outline _
.ShowLevels columnLevels:=1




All times are GMT +1. The time now is 01:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com