View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Need to embed a graphic, then make a call to it

I'm not sure why you can't stack them in position, but if you did then
all you'd need to do is toggle their Visible property. To do this in my
projects I use a string representing the the 6 pics, then pass this to
a Toggle_PicsDisplay procedure that's targeted to those pics only...

The settings string"
"0,0,0,0,0,0" 'all hidden
"1,0,0,0,0,0" 'pic1 visible

...and the Toggle_PicsDisplay procedure also uses a string containing
the names of the 6 pics...

<air code
Sub Toggle_PicsDisplay(sSettings$)
Dim n%, vPicNames As Variant, vSettings As Variant

vPicNames = Array("Pic1","Pic2","Pic3","Pic4","Pic5","Pic6")
vSettings = Split(sSettings, ",")
For n = LBound(vPicNames) To UBound(vPicNames)
ActiveSheet.Shapes(vPicNames(n)).Visible = CBool(vSettings(n))
Next
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion