Scroll Bar / Spin Button Small Change value

G

Guest

I'm using the following code for a scroll bar, straight from the help menu.
I need the small change value to be "0.5".
In this instance it does not work.
Any ideas why?
regards
Wayne


Private Sub Workbook_Open()
Set sb = Worksheets(1).Shapes.AddFormControl(xlScrollBar, _
Left:=10, Top:=10, Width:=10, Height:=200)
With sb.ControlFormat
.LinkedCell = "D1"
.Max = 100
.Min = 0
.LargeChange = 10
.SmallChange = 0.5

End With


End Sub
 
N

NickHK

If you check the Object Browser, you can see these properties of are longs,
hence no decimal part.
If you need this, multiply all properies by 10, then divide by 10 before
using the .Value.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top