Kunst

Am Wochenende im Kunstmuseum. Zeitgenössische Kunst angesehen. Wieder einmal begeistert von Mustern. Das kann man mit Visio doch auch?
Klar: Ein paar Zeilen Code und fertig ist das Zufallskunstwerk:
Sub MacheBunt()
Dim intRot As Integer
Dim intGrün As Integer
Dim intBlau As Integer
Dim strFormel30 As String
Dim strFormelMinus30 As String
Dim strFormelMinus90 As String
Dim i As Integer
Randomize
intRot = Int(255 * Rnd)
intGrün = Int(255 * Rnd)
intBlau = Int(255 * Rnd)
strFormel30 = „=RGB(“ & intRot & „;“ & intGrün & „;“ & intBlau & „)“
Randomize
intRot = Int(255 * Rnd)
intGrün = Int(255 * Rnd)
intBlau = Int(255 * Rnd)
strFormelMinus30 = „=RGB(“ & intRot & „;“ & intGrün & „;“ & intBlau & „)“
Randomize
intRot = Int(255 * Rnd)
intGrün = Int(255 * Rnd)
intBlau = Int(255 * Rnd)
strFormelMinus90 = „=RGB(“ & intRot & „;“ & intGrün & „;“ & intBlau & „)“
For i = 1 To ActivePage.Shapes.Count
If ActivePage.Shapes(i).Cells(„Angle“).Result(„deg“) = 30 Then
ActivePage.Shapes(i).Cells(„FillForegnd“).Formula = strFormel30
ElseIf CInt(ActivePage.Shapes(i).Cells(„Angle“).Result(„deg“)) = -30 Then
ActivePage.Shapes(i).Cells(„FillForegnd“).Formula = strFormelMinus30
ElseIf CInt(ActivePage.Shapes(i).Cells(„Angle“).Result(„deg“)) = -90 Then
ActivePage.Shapes(i).Cells(„FillForegnd“).Formula = strFormelMinus90
End If
Next i
End Sub

farben03 farben02 farben

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert