Danke und Frage
28.10.2010 16:47:16
Isolde
Hallo Rudi,
mit Hilfe Deines Makros habe ich jetzt so lange laienhaft an meinem Makro herumexperementiert, so dass es jetzt endlich richtig funktioniert!!! DANKE!
Dein Makro konnte ich nicht so komplett übernehmen, weil meine Schaltfläche ja ganz anders aussehen soll und anders positioniert ist!!
Kannst du mir bitte sagen wie ich dieses aufgenommene Makro noch vereinfachen kann...also ohne diese überflüssigen Befehle?
Hier das Makro was Schaltfläche erstellt und Makro zuweist:
Sub Makro6()
Dim myShape As Shape
Set myShape = ActiveSheet.Shapes.AddShape(msoShapeRectangle, 5738.25, 27.75, 147#, 102#)
With myShape
.Fill.Visible = msoTrue
.Fill.Solid
.Fill.ForeColor.SchemeColor = 55
.Fill.Transparency = 0#
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoTrue
.Line.ForeColor.SchemeColor = 64
.Line.BackColor.RGB = RGB(255, 255, 255)
myShape.Select
Selection.Characters.Text = "Alle anzeigen (alle Filter werden zurückgesetzt)"
With Selection.Characters(Start:=1, Length:=13).Font
.Name = "Arial"
.FontStyle = "Standard"
.Size = 20
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
End With
With Selection.Characters(Start:=14, Length:=35).Font
.Name = "Arial"
.FontStyle = "Standard"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.ReadingOrder = xlContext
.Orientation = xlHorizontal
End With
Selection.Characters.Text = "Alle anzeigen" & Chr(10) & " (alle Filter werden zurückgesetzt) _
With Selection.Characters(Start:=1, Length:=14).Font
.Name = "Arial"
.FontStyle = "Standard"
.Size = 20
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
With Selection.Characters(Start:=15, Length:=35).Font
.Name = "Arial"
.FontStyle = "Standard"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
Range("BX1").Select
Selection.Characters.Text = "Alle anzeigen" & Chr(10) & " (alle Filter werden zurückgesetzt) _
With Selection.Characters(Start:=1, Length:=14).Font
.Name = "Arial"
.FontStyle = "Standard"
.Size = 20
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
With Selection.Characters(Start:=15, Length:=35).Font
.Name = "Arial"
.FontStyle = "Standard"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
With myShape
.OnAction = "Makro37_AlleAnzeigen"
End With
End Sub