Solved

Scroll Increment

Posted on 2006-06-22
3
216 Views
Last Modified: 2012-08-14
How do you make a scroll bar increment +/- .1 or less.
0
Comment
Question by:pat_cunningham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

749 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