of Named Ranges, Dynamic Charts and scroll bars...

Z

z.entropic

I can create a dynamic range chart and a scrolling chart using a scroll bar.
However, I'm stuck on the the definition of the maximum range in the scroll
bar control box, which accepts numbers only, not COUNTA...

In learing how to do those, I relied on a few great pages by our resident
MVPs:

http://www.andypope.info/charts.htm
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=518
http://www.ozgrid.com/Services/ExcelChartTools.htm
http://www.cpearson.com/excel/lookups.htm

but I was not able to blend the two tricks together..

Any tips and leads would be appreciated.

z.entropic
 
Z

z.entropic

whoo-hoo! a direct hit--thanks!

z.entropic

John Mansfield said:
z.entropic,

Assuming your scrollbar is named "Scrollbar1", you might try to apply code
similar to that below:

Private Sub ScrollBar1_Change()
Dim Rng As Range
cnt = 0
For Each Rng In Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row)
cnt = cnt + 1
Next Rng
With ScrollBar1
.Max = cnt
.Min = 1
End With
End Sub

An explanation can be found here:

http://www.pdbook.com/index.php/excel/automatically_updating_a_scroll_bar/
 

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