Zufalls-Grafik
Es sind 6 Grafiken vorhanden.
Diese sollen nach dem Zufalls-Prinzip angezeigt werden
Sub Zufalls_Grafiken()
On Error GoTo Errorhandler
Dim i As Byte
Dim x As Byte
' Alle Grafiken ausblenden
For i = 1 To ActiveSheet.Shapes.Count
ActiveSheet.Shapes(i).Visible = False
Next i
[A1].FormulaR1C1 = "=ROUND(RAND()*5,0)+1"
x = [A1].Value
ActiveSheet.Shapes(x).Visible = True
Errorhandler:
MsgBox "Es sind nicht 6 Grafiken im Tabellenblatt vorhanden"
End Sub