2 Schriftgrößen im Kommentar
30.04.2008 14:51:00
mario
ich möchte gern 2 verschieden Schriftgrößen im Kommentar haben.
- eine kleinere für "Application.UserName"
- eine größere für den eingegebenen Text
Ich bekomme es leider nur für die gesamte Box hin. Könnt Ihr mir bitte mal helfen?!
Private Sub CommandButton3_Click() 'Kommentar_erstellen
Dim cmt As Comment
Dim sComment As String
'Application.DisplayCommentIndicator = xlCommentAndIndicator
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
If Not ActiveCell.Comment Is Nothing Then
ActiveCell.Comment.Delete
End If
sComment = InputBox(prompt:="Bitte Kommentar eingeben:")
If sComment = "" Then Exit Sub
Set cmt = ActiveCell.AddComment
With cmt
.Visible = False
.Text Text:=Application.UserName & ":" & vbLf & sComment
With .Shape
.Height = 40
.Width = 150
With cmt.Shape.TextFrame.Characters.Font
.Name = "Arial"
.Size = 12
.Bold = False
End With
End With
End With
End Sub