scrollbars
is there a way to make a scrollbar scroll through decimal values? I want it to go from 0 to 100 by 0.1. It appears that only integers are allowed as the change values.
Attachment | Size |
---|---|
scroll-fractions.xls | 32 KB |
ExcelExperts.comExcel Consultancy, VBA Consultancy, Training and Tips Call:+442081234832 |
|
Excel / VBA ConsultancyFree Training VideosFree SpreadsheetsExcel / VBA JobsNavigationWho's onlineThere are currently 0 users and 622 guests online.
New Excel Experts
Current Excel / VBA Jobs |
scrollbarsis there a way to make a scrollbar scroll through decimal values? I want it to go from 0 to 100 by 0.1. It appears that only integers are allowed as the change values.
|
Highest Ranked Users
Recent Blogs
ForumsRecent comments
User login |
scroll fractions
Joe - I've not found a good solution to this.
The only way was to link a cell, and divide by 10.. but you probably worked that out already.
(attached example to your post)
scrollbars
so here is the weird thing - if you look in Excel Help and go to "learn about scrollbars and spin buttons" it clearly shows a scrollbar scrolling through interest rates with the current value set to 8.90%, which is excatly what I want to do. In order to accomplish this without the user being aware, I would have to hide the linked cell and display the rate in another cell. This is not really acceptable because then the user could not just type in an interest rate as this would overwrite the code. I know I could then restore it but really . . .
scroll fractions
Hi Joe.. I have updated the example to allow for the user to enter their own value.
Needs a bit of VBA though in the worksheet's module:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = Range("e3").Address Then
Range("e2").Value = Target.Value * 1000
Target.Formula = "=E2/1000"
End If
Application.EnableEvents = True
End Sub
- when your user enters the percentage in the right cell, change the linked cell to reflect this, and put back the formula.
One thing that's clear is that neither the forms nor the objects allow the entry of percentages so I think this is your best option.
Nick
thanks
Once I realized there was no way to do what I wanted directly, I followed your suggestion and put the linked cells out of sight so the user thinks the parameter they see is changing in response to moving the arrow. I'll add the VBA as well.