Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JRW in Idaho
 
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?
  #2   Report Post  
John Mansfield
 
Posts: n/a
Default

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chart newbie help, please, How to create JohnT Charts and Charting in Excel 3 November 30th 04 04:17 PM
Why do my text boxes disappear from my chart when I click out? Robboo Charts and Charting in Excel 1 November 27th 04 05:49 PM


All times are GMT +1. The time now is 02:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"