Voici un extrait de code:
n = 5
If n = 2 Then a = Int(1 + Rnd * (8 - 1 + 1))
Sheets("mots+définitions").Cells(a, 4).Copy Destination:=Sheets("ACCUEIL").Range("B6")
Range("B6").Select
With Selection.Font
.Name = "Script MT Bold"
.Size = 28
End With
With Selection
.HorizontalAlignment = xlCenter
End With
ElseIf n = 3 Then a = Int(9 + Rnd * (74 - 9 + 1)) : ici c'est bloqué avec comme message Else sans if
Sheets("mots+définitions").Cells(a, 4).Copy Destination:=Sheets("ACCUEIL").Range("B6")
Range("B6").Select