Wir bekommen jetzt excel 2010 vorher 2003.
Wir hatten über VBA immer eine Art schaltfläche
Jetzt kommt die Meldung:
Laufzeitfehler'1004':
Schriftgrad muss zwischen 1 und 409 Punkten liegen.
Dann gehe ich auf Debuggen.
Dann beim Code: Color Index =3 ein Fehler.
ActiveSheet.Shapes("Button 1").Select
Selection.Characters.Text = _
"Punkt für Komma ersetzen" & Chr(10) & "" & Chr(10) & "- Spalte H bis Spalte L selektieren" & Chr(10) & "- Strg+ H Taste drücken" & Chr(10) & "- Suchen nach: ein Punkt" & Chr(10) & "- Ersetzen nach: ein Komma" & Chr(10) & "- auf Alle ersetzen drücken" & Chr(10) & "" & Chr(10) & "Danach bitte auf diesen Button kl"
Selection.Characters(201).Insert String:="icken"
With Selection.Characters(Start:=1, Length:=24).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 18
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 3
End With
With Selection.Characters(Start:=25, Length:=2).Font
.Name = "Arial"
.FontStyle = "Standard"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Characters(Start:=27, Length:=9).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Characters(Start:=36, Length:=2).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 5
End With
With Selection.Characters(Start:=38, Length:=3).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Characters(Start:=41, Length:=1).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 5
End With
With Selection.Characters(Start:=42, Length:=6).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Characters(Start:=48, Length:=14).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 5
End With
With Selection.Characters(Start:=62, Length:=3).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Characters(Start:=65, Length:=13).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 5
End With
With Selection.Characters(Start:=78, Length:=24).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Characters(Start:=102, Length:=9).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 5
End With
With Selection.Characters(Start:=111, Length:=18).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Characters(Start:=129, Length:=9).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 5
End With
With Selection.Characters(Start:=138, Length:=7).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Characters(Start:=145, Length:=13).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 5
End With
With Selection.Characters(Start:=158, Length:=8).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Characters(Start:=166, Length:=2).Font
.Name = "Arial"
.FontStyle = "Standard"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Characters(Start:=168, Length:=38).Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 18
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 3
End With
Range("J28").Select
ActiveSheet.Shapes("Button 1").Select
Selection.OnAction = "PERSONAL.xls!Zeiterfassung1"
Range("J30").Select
End Sub
Woran liegt das und wie kann ich den Fehler beheben?
Lieben Dank
Sandy