开发者

excel group with hidden rows

开发者 https://www.devze.com 2022-12-12 03:26 出处:网络
I have an Excel sheet where several rows are grouped together using \"Group and outline\". By default the group is to be expanded but I have one row that I have hidden using vba in Workbook_Open.

I have an Excel sheet where several rows are grouped together using "Group and outline".

By default the group is to be expanded but I have one row that I have hidden using vba in Workbook_Open.

After I click the [-] 开发者_开发问答to collapse the group and then the [+] to expand it again my hidden row is now visible.

Is there a way to keep the hidden row hidden even after the group is collapsed and expanded again? Or is there a way to capture an event so that I can use vba to hide the row every time the group is expanded?


From a link on another site Excel VBA Trap the Group and Outline expand/collapse (Show Detail / Hide Detail) events

What it states is

the only event you can trigger with a group collapse/expand action is the calculation event. To do so you need to use the SUBTOTAL function which is aware of whether or not rows are hidden.

I hope this helps you

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号