View Single Post
  #6   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 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")


Brian Murphy wrote:

Thanks, Dave. I will pursue the Forms version.

Here's something strange.

I'm finding that to programmatically change the properties of a Forms
scrollbar, I have to "Select" it first, and then use Selection.whatever.
All other ways I've tried give a r/t error.

Brian

"Dave Peterson" wrote in message
m...
I don't think you are doing anything wrong (well, in excel anyway!).

I think your conclusion is accurate.


"Brian Murphy" wrote in message

...
Well, I suppose you are confirming that Control Toolbox scrollbars can
not be put inside a chart.

I was hoping it was because there was something I was doing wrong.
Please correct me if this is not right.

Thanks,

Brian


--

Dave Peterson