1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
| Private Sub gras()
Dim b As Integer, c As Integer, x As Integer, y As Integer, z As Integer
'adresse de la cellule de destination a adapter.
Feuil1.Range("j20") = "Bonjour, " & Feuil1.Range("B10") & ", nous sommes le, " & CDate(Format((Now), "dd-mmm-yyyy"))
a = Feuil1.Range("j20")
b = InStr(a, ",")
c = Len(a)
x = InStr(b + 1, a, ",")
y = InStr(x + 1, a, ",")
Feuil90.Range("j20").Select
With ActiveCell.Characters(Start:=1, Length:=0).Font
.Name = "Arial"
.FontStyle = "Normal"
.Size = 14
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With ActiveCell.Characters(Start:=1, Length:=b).Font
.Name = "Arial"
.FontStyle = "Gras"
.Size = 14
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With ActiveCell.Characters(Start:=b + 1, Length:=x - b).Font
.Name = "Arial"
.FontStyle = "Normal"
.Size = 14
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With ActiveCell.Characters(Start:=x, Length:=y - x + 1).Font
.Name = "Arial"
.FontStyle = "Gras"
.Size = 14
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
End Sub |
Partager