Visio VBA - My macro assignment to multi-layer buttons isn't working
I have a Visio sheet with two views (technical and management).
I have two buttons in the upper right corner that somehow aren't working 100% of the time.
I want the "PRESS TO VIEW TECHNICAL" button to be visible when I'm in the manager view.
I want the "PRESS TO VIEW SUMMARY" button to be visible when I'm in the technical view. Both buttons are in the same X/Y position.
I assigned the technical button to the management layer.
I assigned the management button to the technical layer.
Somehow they don't seem to work consistently.
Currently I press:
- CTRL + t for technical view.
- CTRL + m for manager view.
I want to assign those two macros to two buttons.
Please tell me what I did wrong. And how to fix it.
Hi Scott:
Brilliant solution for a two-layer diagram. Thanks.
Chris Roth
Hi BT, Scott,
I think there's some background to this thread that started with another question from BT a few days ago.
He was having a problem with layers on multiple pages. The layers were created in different order, and had different indices, so a recorded macro didn't work properly on Page-2.
Scott's solution is very cool, but is also susceptible to this layer-index problem as well. However, you might not need the extra pages, now that this is working!
Chris Roth
Regarding the history/other question I mentioned: I've posted a VBA solution (with Ctrl + M/Ctrl + T switching between layers) here:
Brilliant solution for a two-layer diagram. Thanks.