Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Fontstyle übertragen

Forumthread: Fontstyle übertragen

Fontstyle übertragen
TomTom
Hallo Leute
ich versuche in meinem Script den fontstyle zu übertragen, aber das funktioniert nicht ... hat mir jemand einen Tip?

Sub font_style_übertragen()
Range("A1").Font.FontStyle = Range("A2").Font.FontStyle
End Sub

Danke und Gruss
TomTom
Anzeige

4
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Benutzer
Anzeige
AW: Fontstyle übertragen
Josef
Hallo Tom!
Versuch's mal so.
Sub test()
With Range("B1").Font
.Italic = Range("A1").Font.Italic
.Bold = Range("A1").Font.Bold
.Underline = Range("A1").Font.Underline
.Name = Range("A1").Font.Name
.Size = Range("A1").Font.Size
End With
Gruß Sepp
AW: Fontstyle übertragen
TomTom
Danke Sepp
Dein Tip funktioniert zwar, aber ich frage mich trotzdem, was denn in meinem Script falsch ist?
Alles andere, also zum Beispiel
Range("A1").Font.ColorIndex = Range("A2").Font.ColorIndex
Range("A1").Font.Bold = Range("A2").Font.Bold
Range("A1").Font.Italic = Range("A2").Font.Italic
etc. funktioniert auf diese Weise einwandfrei
Gruss TomTom
Anzeige
AW: Fontstyle übertragen
Josef
Hallo Tom!
An deinem Code ist nichts falsch, aber mit
.FontStyle überträgst du nur "Fett" oder "Kursiv"
Unterstreichung, Farbe und dergl. aber nicht!
Gruß Sepp
AW: Fontstyle übertragen
TomTom
Hallo Sepp
Besten Dank und Gruss
TomTom
;

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige