You should be able to see the sub if you put it in a standard module.
I didn't realize there are 3 sets of pics and so...
Sub Toggle_PicsDisplay(sSettings$)
Dim n%, vPicNames As Variant, vSettings As Variant, vSet As Variant
Const sPicSets$ = "a,b,c"
vPicNames = Array("Pic1","Pic2","Pic3","Pic4","Pic5","Pic6")
vSettings = Split(sSettings, ",")
For Each vSet in sPicSets
For n = LBound(vPicNames) To UBound(vPicNames)
ActiveSheet.Shapes(vPicNames(n) & vSet).Visible = _
CBool(vSettings(n))
Next
Next
End Sub
...where the pics are named according to location a, b, or c. Otherwise,
they all have the same name but just append the location identifier.
Optionally, you could pass sPicSets to the procedure if you wanted to
specify individual sets independant of the others...
Sub Toggle_PicsDisplay(sSettings$, Optional sPicSets)
Dim n%, vPicNames As Variant, vSettings As Variant, vSet As Variant
vPicNames = Array("Pic1","Pic2","Pic3","Pic4","Pic5","Pic6")
If sPicSets = "" Then sPicSets = "a,b,c"
For Each vSet in sPicSets
For n = LBound(vPicNames) To UBound(vPicNames)
ActiveSheet.Shapes(vPicNames(n) & vSet).Visible = _
CBool(vSettings(n))
Next
Next
End Sub
...where it will process 1, 2, or 3 sets according to what you pass to
it in the sPicSets arg.
===============
I find toggling the Visible property is easier to code for than using
order (front/rear)!
You can control the execution in the Worksheet_Change event so you can
monitor activity in the cells that trigger pics display.
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion