cellMatrix.net

Spreadsheet Modeling and Related Topics

Returning Non-Integer Values from Scrollbars

A recent post to the Microsoft Excel Charting Newsgroup asked "how can I return a non-integer value from a scrollbar? A VBA approach would be to divide the scrollbar output by 10, 100, 1000, etc. Assuming the scrollbar is named "SB1", the example below returns values between 0.1 and -0.1:

Private Sub SB1_Change()
  Range("A1").Value = SB1.Value / 1000
  ScrollBar1.Max = 100
  ScrollBar1.Min = -100
End Sub

Private Sub SB1_Scroll()
  Range("A1").Value = SB1.Value / 1000
  ScrollBar1.Max = 100
  ScrollBar1.Min = -100
End Sub

Posted on Tuesday, November 13, 2007 | Comments (0) | Permalink

Comment Entry Form

User Information

Name: (Required)

E-Mail Address: (Optional)

Location: (Optional)

Web Site Address: (Optional)

Comment Formatting Reference
Add VBA Code:
<pre>some code here</pre>
Linking:
[url]http://www.example.com/[/url]
[url=http://www.example.com/]my site[/url]
Text Formatting
[size=4]Some larger text[/size]
[color=green]Some green text[/color]
[b]Some bold text[/b]
[i]Some italic text[/i]
Enter Comment Below

Personalization Options
Remember my personal information
Notify me of follow-up comments?

Next entry: Why Use Pie Charts?

Previous entry: In-Cell Charting

<< Back to main

Statistics

  • Total Entries - 136
  • Current Viewers - 16

Categories

Entries by Day

Sep - 2010
S M T W T F S
29 30 31 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 1 2

Recent Comments

Syndicate