
25-11-10, 12:42
|
 | Διαχειριστής Όνομα: Τάσος Φιλοξενιδης Έκδοση λογισμικού Office: Ms-Office 365 Γλώσσα λογισμικού Office: Ελληνική, Αγγλική, Γερμανική | | Εγγραφή: 21-10-2009
Μηνύματα: 2.030
| |
Καλησπέρα σε όλους!
Κοιτάξτε τον παρακάτω παραδειγματικό κώδικα: Κώδικας: Sub FormatMyComment()
With ActiveCell
If Not .Comment Is Nothing Then
With .Comment.Shape.TextFrame.Characters.Font
.Italic = True
.Size = "10"
.Name = "Arial"
.ColorIndex = 0
End With
With .Comment.Shape.TextFrame
.Characters.Text = "ms-Office.gr" & vbLf & "This is a test"
With .Characters(1, Len("ms-Office.gr"))
.Font.ColorIndex = 3
.Font.Italic = False
.Font.Bold = True
End With
'.AutoSize = True
End With
With .Comment.Shape
.Shadow.Transparency = 0.5
.Fill.ForeColor.SchemeColor = 44
.Fill.OneColorGradient msoGradientHorizontal, 4, 0.5
.Fill.Transparency = 0.5
End With
End If
End With
End Sub
Χρησιμοποιώντας τα σωστά αντικείμενα (όχι Selection κτλ. που καταγράφει ο Macro Recorder) θα έχουμε την πλήρη υποστήριξη του InteliSence στον VBE.
Καλή συνέχεια!
Φιλικά
Τάσος
__________________ Ms-Office Development Team Ανάπτυξη επαγγελματικών εφαρμογών |