Ändern Sie die Farbe, die Form mit einem makro
Möchte ich ändern Sie die Farbe einer Form mit einem makro.
ActiveSheet.Shapes.Range(Array("Rectangle 20")).Select
If Selection.ShapeRange.Fill.Visible = msoFalse Then
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 0, 0)
Selection.ShapeRange.Fill.Transparency = 0
Selection.ShapeRange.Fill.Solid
Else: Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Visible = msoFalse
End If
If Selection.ShapeRange.Fill.Visible = msoTrue Then
Selection.ShapeRange.Fill.Visible = msoFalse
Else: Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 0, 0)
Selection.ShapeRange.Fill.Transparency = 0
Selection.ShapeRange.Fill.Solid
End If
Nun möchte ich, wenn es keine Füllung, es wird rot, und wenn die Füllung rot ist, ist es keine Füllung.
Kann mir jemand helfen?
InformationsquelleAutor Freek v. wely | 2015-05-06
Du musst angemeldet sein, um einen Kommentar abzugeben.
InformationsquelleAutor Freek v. wely
Versuchen Sie dies:
Ist es auch möglich ein makro machen für den Wechsel der Farbe einer Form von RGB(255, 0, 0) und RGB(0, 176, 80)?
Ich habe bereits den code erhalten haben
InformationsquelleAutor L42