Doing some 'for love' programming for my wife to help with a work project, I've hit a bit of a hurdle. My spreadsheet runs through a number of individual datasets relating to specific projects on the first sheet, and produces a nice graphical representation of hours worked on the second (refer the image link below for an example output).
Her company would like to be able to export this output to a second workbook (easy) to allow it to be issued to clients. They want the detailed data below each header row to be able to be expanded/collapsed by clicking a button next to the header row, as indicated on my mock-up output picture.
I'm fine with the coding to flip the button the other way up, determine the length up the data subset and hide/unhide it, etc BUT what I can't work out is this:
If I assign a macro to a shape and click it, how do I:
1) Query the name of the shape that was clicked so that I can then invert it using msoFlipVertical
2) Query which row the shape is located in so that I can collapse/expand the relevant data set
I'm a dodgy occasional programmer so I propose 'toggling' the expand/collapse routines by writing to a hidden cell - eg '1' = currently expanded; '0' = currently collapsed. Working with Control Toolbox toggle buttons just didn't work the way I wanted.
Any help greatly appreciated!
\1
Bookmarks