PC Review Forums Newsgroups Microsoft Excel Microsoft Excel Charting How do I create a custom scroll bar on a 3D Pivot Chart?

Reply

How do I create a custom scroll bar on a 3D Pivot Chart?

 
Thread Tools Rate Thread
Old 01-12-2004, 04:25 PM   #1
=?Utf-8?B?SlJXIGluIElkYWhv?=
Guest
 
Posts: n/a
Default How do I create a custom scroll bar on a 3D Pivot Chart?


I have created a 3D Pivot Chart from a Pivot Table and have seen examples
that have custom scroll bars to control the zoom and scroll by axis and other
features of the chart. How is this accomplished?
  Reply With Quote
Old 01-12-2004, 08:55 PM   #2
John Mansfield
Guest
 
Posts: n/a
Default How do I create a custom scroll bar on a 3D Pivot Chart?

One way - you can add these effects by adding defined
ranges to the chart. You might want to look at some of
the charting examples at Stephen Bullen's site:

http://oaltd.co.uk/Excel/Default.htm

Another way - this VBA code can be added to a userform to
cause the worksheet in which an embedded chart resides to
zoom in, zoom out, move up, and/or move down. You will
need to add three scroll bars to the user form. One will
zoom the chart in or out, one will move it to the right or
left, and the last one will move it up or down.

Private Sub UserForm_Initialize()
' Zoom
With ScrollBarZoom
.Min = 10
.Max = 400
.SmallChange = 1
.LargeChange = 10
.Value = ActiveWindow.Zoom
End With

' Horizontally scrolling
With ScrollBarColumns
.Min = 1
.Max = 256
.Value = ActiveWindow.ScrollColumn
.LargeChange = 25
.SmallChange = 1
End With

' Vertically scrolling
With ScrollBarRows
.Min = 1
.Max = ActiveSheet.Rows.Count
.Value = ActiveWindow.ScrollRow
.LargeChange = 25
.SmallChange = 1
End With
End Sub

Private Sub ScrollBarZoom_Change()
With ActiveWindow
.Zoom = ScrollBarZoom.Value
LabelZoom = .Zoom & "%"
.ScrollColumn = ScrollBarColumns.Value
.ScrollRow = ScrollBarRows.Value
End With
End Sub

Private Sub ScrollBarColumns_Change()
ActiveWindow.ScrollColumn = ScrollBarColumns.Value
End Sub

Private Sub ScrollBarRows_Change()
ActiveWindow.ScrollRow = ScrollBarRows.Value
End Sub

Regards,

John Mansfield

>-----Original Message-----
>I have created a 3D Pivot Chart from a Pivot Table and

have seen examples
>that have custom scroll bars to control the zoom and

scroll by axis and other
>features of the chart. How is this accomplished?
>.
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off