Sub Macro7()
texte = "Test"
Largeur = 900
Hauteur = 600
For F = 1 To 25
ActiveSheet.Select: Range("A" & F).Activate
'choix du type de police
t = Int((Rnd * 3) + 1)
If t = 1 Then
police = "Blackadder ITC"
ElseIf t = 2 Then
police = "Adobe Song Std L"
ElseIf t = 3 Then
police = "BankGothic Lt BT"
ElseIf t = 4 Then
police = "Verdana"
ElseIf t = 5 Then
police = "Times New Roman"
ElseIf t = 6 Then
police = "Shonar Bangla"
ElseIf t = 7 Then
police = "MS Serif"
ElseIf t = 8 Then
police = "Magneto"
ElseIf t = 9 Then
police = "Centaur"
ElseIf t = 10 Then
police = "Arial"
End If
'choix du type word
t = Int((Rnd * 10) + 1)
If t = 1 Then
ActiveSheet.Shapes.AddTextEffect(msoTextEffect1, texte, _
police, 10, msoTrue, msoFalse, Int((Rnd * Largeur) + 1), Int((Rnd * Hauteur) + 1)).Select
ElseIf t = 2 Then
ActiveSheet.Shapes.AddTextEffect(msoTextEffect3, texte, _
police, 10, msoTrue, msoFalse, Int((Rnd * Largeur) + 1), Int((Rnd * Hauteur) + 1)).Select
ElseIf t = 3 Then
ActiveSheet.Shapes.AddTextEffect(msoTextEffect5, texte, _
police, 10, msoTrue, msoFalse, Int((Rnd * Largeur) + 1), Int((Rnd * Hauteur) + 1)).Select
ElseIf t = 4 Then
ActiveSheet.Shapes.AddTextEffect(msoTextEffect6, texte, _
police, 10, msoTrue, msoFalse, Int((Rnd * Largeur) + 1), Int((Rnd * Hauteur) + 1)).Select
ElseIf t = 5 Then
ActiveSheet.Shapes.AddTextEffect(msoTextEffect11, texte, _
police, 10, msoTrue, msoFalse, Int((Rnd * Largeur) + 1), Int((Rnd * Hauteur) + 1)).Select
ElseIf t = 6 Then
ActiveSheet.Shapes.AddTextEffect(msoTextEffect14, texte, _
police, 10, msoTrue, msoFalse, Int((Rnd * Largeur) + 1), Int((Rnd * Hauteur) + 1)).Select
ElseIf t = 7 Then
ActiveSheet.Shapes.AddTextEffect(msoTextEffect19, texte, _
police, 10, msoTrue, msoFalse, Int((Rnd * Largeur) + 1), Int((Rnd * Hauteur) + 1)).Select
ElseIf t = 8 Then
ActiveSheet.Shapes.AddTextEffect(msoTextEffect30, texte, _
police, 10, msoTrue, msoFalse, Int((Rnd * Largeur) + 1), Int((Rnd * Hauteur) + 1)).Select
ElseIf t = 9 Then
ActiveSheet.Shapes.AddTextEffect(msoTextEffect25, texte, _
police, 10, msoTrue, msoFalse, Int((Rnd * Largeur) + 1), Int((Rnd * Hauteur) + 1)).Select
ElseIf t = 10 Then
ActiveSheet.Shapes.AddTextEffect(msoTextEffect17, texte, _
police, 10, msoTrue, msoFalse, Int((Rnd * Largeur) + 1), Int((Rnd * Hauteur) + 1)).Select
End If
'choix de la couleur
t = Int((Rnd * 10) + 1)
If t = 1 Then
Selection.Font.Color = -16777024
ElseIf t = 2 Then
Selection.Font.Color = -16776961
ElseIf t = 3 Then
Selection.Font.Color = -16727809
ElseIf t = 4 Then
Selection.Font.Color = -1990422
ElseIf t = 5 Then
Selection.Font.Color = -11480942
ElseIf t = 6 Then
Selection.Font.Color = -11489280
ElseIf t = 7 Then
Selection.Font.Color = -1003520
ElseIf t = 8 Then
Selection.Font.Color = -4165632
ElseIf t = 9 Then
Selection.Font.Color = -10477568
ElseIf t = 10 Then
Selection.Font.Color = -6279056
End If
'choix de la taille
t = Int((Rnd * 40) + 1)
If t < 20 Then
Selection.Font.Size = t + 15
ElseIf t > 21 Then
Selection.Font.Size = t
End If
'Rotation
Selection.ShapeRange.IncrementRotation Int((Rnd * 89) + 1)
Next F
End Sub