is there a way to eliminate the button and have the action triggered by the text "Yes", or "No"?
My initial thought several days ago was that this is what you really needed, but didn't ask for. See the attached file which does NOT CHANGE the original code, but adds the code below (which is included in the new file).
The following code in the ThisWorkbook module makes sure the rows are expanded/collapsed per 'Yes/No' (case insensitive) in Column 'B' when the Workbook is OPENED.
The following code in the 'Sheet2' module expands/collapses rows per 'Yes/No' in Column 'B' each time there is a change in Column 'B'.
NOTE: The items in red below previously existed in the 'Sheet2' module and should ONLY exist ONCE in the module.
Lewis
Bookmarks