Option Explicit
Public colSBtn As Collection
Public Sub mInit()'/variation sur un code d'Andy Pope/
Dim clsSpn As ClassSpinBtn, oShp As Shape
Set colSBtn = New Collection
For Each oShp In Worksheets("Sheet1").Shapes
If InStr(oShp.OLEFormat.progID, "Forms.SpinButton") > 0 Then
With oShp
.OLEFormat.Object.Object.Min = 1
.OLEFormat.Object.Object.Max = 30
End With
Set clsSpn = New ClassSpinBtn
Set clsSpn.EventHandle = oShp.OLEFormat.Object.Object
colSBtn.Add clsSpn, CStr(colSBtn.Count + 1)
End If
Next
End Sub