Solved

Scroll Increment

Posted on 2006-06-22
3
210 Views
Last Modified: 2012-08-14
How do you make a scroll bar increment +/- .1 or less.
0
Comment
Question by:pat_cunningham
  • 2
3 Comments
 
LVL 9

Expert Comment

by:pradapkumar
ID: 16966356
incrementation of scroll bar in decimal values is not allowed in generic control. You may design one control for that sake.
0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 16966516
or for example if you want your scroll bar to go from 0 to 10 with .1 steps

Set Min = 0
Set Max = (10/.1)


Then on Value you could do:

msgbox (vSlider1.value * .1 )


Do you see how this is simulating the decimal values? Just an idea
0
 
LVL 19

Accepted Solution

by:
BrianGEFF719 earned 250 total points
ID: 16966530
Here is a working example, this example goes from 0 to 10 with a horinzontal scroll bar named HScroll1, it steps by .1 increments.

Private dblStep As Double
Private lngScrollMax As Long



Private Sub Form_Load()
dblStep = 0.1
lngScrollMax = 10

HScroll1.Min = 0
HScroll1.Max = (lngScrollMax / dblStep)
HScroll1.SmallChange = 1
HScroll1.LargeChange = 2


End Sub

Private Sub HScroll1_Change()
Dim dblValue As Double
dblValue = HScroll1.Value * dblStep

MsgBox "The Value is really: " & dblValue
End Sub
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now