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

Forumthread: Zellinhalt mit Fonts in Textbox

Zellinhalt mit Fonts in Textbox
10.12.2005 23:14:00
smashy
Hallo,
hat jemand eine Ahnung wie ich den gesamten Inhalt einer Zelle in eine TextBox bekomme? Das Problem besteht darin, dass ich auch Fontwechsel und möglichst HintergrundFarbe mitkopieren möchte. Bis jetzt kann ich leider nur den Inhalt ohne jede Formatierung kopieren. THX!!
With ActiveSheet.Shapes(intShape)
.TextFrame.Characters.Text = ActiveCell.Value 'Range("A7").Value
.Line.Visible = msoFalse
.Fill.ForeColor.SchemeColor = GetColorIndex
'ActiveCell.Interior.ColorIndex
End With
smashy - in keeping tradition group
http:/kickme.to/smashy
Anzeige

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Zellinhalt mit Fonts in Textbox
11.12.2005 00:07:58
Josef
Hallo ?
Bei einer Textbox geht das nicht!
Wenn du allerdings ein Textfeld aus "Zeichnen" meinst, dann zB. so!
Sub ShapeText()
Dim shp As Shape
Dim n As Integer, k As Integer

Set shp = ActiveSheet.Shapes(1)

n = Len([A1].Text)

With shp
  .DrawingObject.Text = [A1].Text
  For k = 1 To n
    With .TextFrame
      .Characters(k, 1).Font.Name = [A1].Characters(k, 1).Font.Name
      .Characters(k, 1).Font.Size = [A1].Characters(k, 1).Font.Size
      .Characters(k, 1).Font.Color = [A1].Characters(k, 1).Font.Color
      .Characters(k, 1).Font.Bold = [A1].Characters(k, 1).Font.Bold
      .Characters(k, 1).Font.Italic = [A1].Characters(k, 1).Font.Italic
      .Characters(k, 1).Font.Underline = [A1].Characters(k, 1).Font.Underline
    End With
  Next
End With
End Sub


'******************************
'* Gruß Sepp
'*
'* Rückmeldung wäre nett!
'******************************

Anzeige
AW: Zellinhalt mit Fonts in Textbox
11.12.2005 15:53:29
smashy
Ja ich meinte die TextBox aus Zeichnen. Das Funktioniert gut, vielen Dank!
;

Forumthreads zu verwandten Themen

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige