Sub Encadrez_Moi_Version_Fun_II()
Dim c, shp, vR%, vV%, vB%
Randomize 1600
If TypeName(Selection) = "Range" Then
With ActiveSheet
For Each c In Selection
Set shp = .Shapes.AddTextbox(1, c.Left, c.Top, c.Width, c.Height)
shp.line.ForeColor.RGB = RGB(192, 0, 0)
vR = Application.RandBetween(0, 255): vV = Application.RandBetween(0, 255): vB = Application.RandBetween(0, 255)
shp.line.ForeColor.RGB = RGB(192, 0, 0)
shp.Fill.TwoColorGradient Application.RandBetween(1, 5), 1
With shp.Fill.GradientStops.Item(1).Color
.RGB = RGB(vR, vV, vB): .TintAndShade = Application.RandBetween(1, 100) / 100
End With
With shp.Fill.GradientStops.Item(2).Color
.RGB = RGB(vR, vV, vB): .TintAndShade = Application.RandBetween(1, 100) / 100
End With
shp.Fill.RotateWithObject = msoTrue
Next
End With
End If
End Sub
Sub Encadrez_Moi_Version_Fun_III()
Dim c, shp, vR%, vV%, vB%, XX
vPres = Array(20, 8, 21, 22, 4, 6, 1, 9, 10, 18, 19, 5, 2, 15, 11, 3, 7, 14, 12, 16, 17, 24, 23, 13, -2)
Randomize 1600
If TypeName(Selection) = "Range" Then
With ActiveSheet
For Each c In Selection
Set shp = .Shapes.AddTextbox(1, c.Left, c.Top, c.Width, c.Height)
vR = Application.RandBetween(0, 255): vV = Application.RandBetween(0, 255): vB = Application.RandBetween(0, 255)
shp.line.ForeColor.RGB = RGB(192, 0, 0)
shp.Fill.PresetGradient Application.RandBetween(1, 5), 1, vPres(Application.RandBetween(0, 23))
Next
End With
End If
End Sub