View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default question about scrollbars and embedded charts

You could have used:

With Worksheets("sheet1").ChartObjects(1).Chart.ScrollB ars("scroll bar 1")

instead of:

With Worksheets("sheet1").ChartObjects(1)
Set mySB = .Chart.ScrollBars("scroll bar 1")
With mySB



Brian Murphy wrote:

Thanks again, Dave.

I think I was trying to do it like:

With Activechart.Chart.ScrollBars("scroll bar 1")

I don't think I tried a Set statement.
I will give it a try, since I don't really want to Select the thing.

Brian

Dave Peterson wrote in message ...
You can get it by going through the chart:

Option Explicit
Sub testme()

Dim mySB As ScrollBar

With Worksheets("sheet1").ChartObjects(1)
Set mySB = .Chart.ScrollBars("scroll bar 1")
With mySB
.LargeChange = 10
.SmallChange = 1
.Min = 8
.Max = 100
.LinkedCell = Worksheets("sheet1").Range("a1") _
.Address(external:=True)
End With
End With

End Sub

If you know your chart is active:

With ActiveChart
Set mySB = .ScrollBars("scroll bar 1")



--

Dave Peterson