Gruppe
Allgemein
Problem
Die Farben von Shapes sollen durch ScrollBars festgelegt werden.
ClassModule: Tabelle3
Private Sub scrRed_Change()
With Range("C5:D5")
.Interior.Color = RGB(scrRed.Value, 0, 0)
.Font.Color = 16581375 - ( _
scrRed.Value * scrGreen.Value * scrBlue.Value)
End With
Call SetCellColor
End Sub
Private Sub scrGreen_Change()
Range("C7:D7").Interior.Color = _
RGB(0, scrGreen.Value, 0)
Call SetCellColor
End Sub
Private Sub scrBlue_Change()
Range("C9:D9").Interior.Color = _
RGB(0, 0, scrBlue.Value)
Call SetCellColor
End Sub
Private Sub SetCellColor()
Range("C4").Interior.Color = _
RGB(scrRed.Value, scrGreen.Value, scrBlue.Value)
Shapes(1).Fill.ForeColor.RGB = RGB( _
scrRed.Value, scrGreen.Value, scrBlue.Value)
DoEvents
End Sub