Not sure of this item is in a form. I tested this macro with a 'spinner' form
item placed on a worksheet:
Sub SetMaxValue()
vNameBoxValueForShape = "SpinnerX2"
vLimitValueInCellM5 = Range("M5").Value
ActiveSheet.Shapes(vNameBoxValueForShape).Select
Selection.Max = vLimitValueInCellM5
End Sub
To automatically get the value from M5 into the Shapes control MAX value, you
will need a worksheet 'Change' event that fires when the value in M5 changes.