Hide Smart Art in Excel 2007

S

Steve

Hi

I'm pretty sure this will be either impossibly easy and I'mn being
stupid in not seeing it, or just impossible.

What I want to do is show or hide a smart art item on the click of a
button in much the same way a userbutton can click open a vba
userform, but can't workj out how to do it as I don't see where I
can / could define a name for the smart art item. (I want to replace
the ugly userform with a shiny SmartArt graphic)

Does anybody have any ideas, please, or am I just asking too much?

Thank you in advance

Steve
 
J

James Ravenswood

Hi

I'm pretty sure this will be either impossibly easy and I'mn being
stupid in not seeing it, or just impossible.

What I want to do is show or hide a smart art item on the click of a
button in much the same way a userbutton can click open a vba
userform, but can't workj out how to do it as I don't see where I
can / could define a name for the smart art item. (I want to replace
the ugly userform with a shiny SmartArt graphic)

Does anybody have any ideas, please, or am I just asking too much?

Thank you in advance

Steve

Hi Steve:

I put a piece of SmartArt on a worksheet and ran the following:

Sub lookFor()
Dim s As Shape
For Each s In ActiveSheet.Shapes
MsgBox s.Name
Next
End Sub

I discovered that the name of the SmartArt was "Diagram 1"

The following two macros:

Sub NowYouSeeMe()
ActiveSheet.Shapes("Diagram 1").Visible = True
End Sub

Sub NowYouDont()
ActiveSheet.Shapes("Diagram 1").Visible = False
End Sub

Will either display or hide the SmartArt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top