CommandButton1 - Chart 1
CommandButton2 - Chart 2
CommandButton3 - Chart 4
Da mach ich dir aber ganz schön zu schaffen *schäm*
Hallo Surranian,
es geht, zumindest beantwortest du ja meine Rückfragen, das ist leieder nicht immer der Fall.
In das Dokumentmodul von Tabelle1:
Option Explicit
'
Private Sub CommandButton1\_Click()
Call Zeigen(1)
End Sub
'
Private Sub CommandButton2\_Click()
Call Zeigen(2)
End Sub
'
Private Sub CommandButton3\_Click()
Call Zeigen(4)
End Sub
In das Dokumentmodul von Tabelle7:
Option Explicit
'
Private Sub Worksheet\_Activate()
Call AlleEinblenden
End Sub
'
Private Sub Worksheet\_Deactivate()
Call AlleEinblenden
End Sub
’
In ein Satandardmodul, z.B. Modul1:
’
Option Explicit
'
Sub Zeigen(ByVal Nr As Integer)
Dim S As Shape
Application.ScreenUpdating = False
With Worksheets("Tabelle7")
Application.EnableEvents = False
.Activate
Application.EnableEvents = True
For Each S In .Shapes
If S.Name Like "Chart\*" Then
S.Visible = False
End If
Next S
.Shapes("Chart " & Nr).Visible = True
'.Shapes("Chart " & Nr).Select
End With
Application.ScreenUpdating = True
End Sub
'
Sub AlleEinblenden()
Dim S As Shape
Application.ScreenUpdating = False
With Worksheets("Tabelle7")
For Each S In .Shapes
If S.Name Like "Chart\*" Then
S.Visible = True
End If
Next S
End With
Application.ScreenUpdating = True
End Sub
Gruß
Reinhard