ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Collapsing rows via command button (https://www.excelbanter.com/excel-discussion-misc-queries/239439-collapsing-rows-via-command-button.html)

Stephanie

Collapsing rows via command button
 
Can it be done?! Thanks for all of the tips in the discussion group- I have
learned how to create collapsible rows. Now I'm wondering if I could have a
command button that would automatically expand and collapse the rows. I'd
appreciate your assistance in explaining what that code would look like.
Thanks!

Don Guillett

Collapsing rows via command button
 

As ALWAYS, post what you have already done for comments

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Stephanie" wrote in message
...
Can it be done?! Thanks for all of the tips in the discussion group- I
have
learned how to create collapsible rows. Now I'm wondering if I could have
a
command button that would automatically expand and collapse the rows. I'd
appreciate your assistance in explaining what that code would look like.
Thanks!



Jacob Skaria

Collapsing rows via command button
 
Do you mean
ActiveSheet.Outline.ShowLevels RowLevels:=1

ActiveSheet.Outline.ShowLevels RowLevels:=<max number of levels

If this post helps click Yes
---------------
Jacob Skaria


"Stephanie" wrote:

Can it be done?! Thanks for all of the tips in the discussion group- I have
learned how to create collapsible rows. Now I'm wondering if I could have a
command button that would automatically expand and collapse the rows. I'd
appreciate your assistance in explaining what that code would look like.
Thanks!



All times are GMT +1. The time now is 10:41 PM.

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