Use Toggle button to make shape invisible?

Started by Michelle, April 21, 2009, 02:54:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Michelle

I have a Visio Template that requires a user to enter info into Shape Data to create a drawing.  In order to remind the users to click on the shape to "activate" the Shape Data, I'd like to have a note on the page when they open the drawing.  I have a simple rectangle with some text and have added a Toggle Button to it...

Can I make the clicking of the Toggle button make the rectangle, text and toggle button itself dissapear? 

Thanks!
Michelle

Visio Guy

Hi Michelle,

Is the toggle button a real button  (ie: tied to VBA code) or a shape?
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

vojo

VBA: set fill transparency to 100.   or set geometryx.noshow = 1

shapesheet:   Actions1 = setf(getref(user.noshow), if(user.noshow=1,0,1))
                    geometryx.noshow = user.noshow

                    In the actions row, can add verbage so that you see the options when rt click shape
                    Actions1.checked = user.noshow
                    Actions1.comment ="show/hide shape"
                   

Michelle

I don't know much about VBA, but I think it's considered a "real" button.  It's the Microsoft Forms 2.0 ToggleButton found under Insert -> Controls.  

Michelle

Vojo,

I'm not sure I fully understand your explaination, sorry.

In your Shapesheet part of your explaination...It's been quite some time since I have done anything with an Actions section, sorry if my memory of it is fuzzy.  You refer to a User.noshow, where do I find that?

Also, I'd like to avoid requiring a rt click.  The end user is our sales department, I fear many of them would have no clue about rt clicking. 

Your post makes me think, though... can I use the actions section to turn off the text and button when the user actually selects the shape?  That would be perfect, since the goal is to have the user select the shape to activate the Shape Data.  How could I go about trying that?

Thanks for your patience!
Michelle

vojo

actions:   see drawing

Single click:  takes VBA

Double click: see drawing...a bit more complicated since once gone, visio engine ignores double click to bring back....so did it with transparency

Michelle

VoJo,

Thank you.  I went with the double click example, and modified it a bit for my use.  It works fine for my purposes for now. 

I'm beginning to think I need to look into some VBA training, though! 

Thanks again!
Michelle