Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ram Nemesis
 
Posts: n/a
Default Can a zoom in/out chart be made?

How can I make a chart which can be zoomed in or out using the mouse or a
button
  #2   Report Post  
John Mansfield
 
Posts: n/a
Default

Ram,

One method would be to use macros. You would add a user form with a
scrollbar to your spreadsheet. The scrollbar would zoom the sheet and in
turn zoom the chart.

To do so, create a new code module and call it €śModule1€ť. Add this code to
the module:

Sub ShowForm()
UserForm1.Show
End Sub

Go to the sheet where your chart resides. Add a button to that sheet via
the Forms toolbar that will activate the scroll form described below. Attach
the macro above to that button.

Next, create a new user form and name it €śUserForm1€ť. Open the new user
form in design mode. Add a scrollbar to the user form via the VBA controls
toolbar and name it SBZoom. Add this code to the code module in the user
form:

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

Private Sub SBZoom_Change()
With ActiveWindow
.Zoom = ScrollBarZoom.Value
.ScrollColumn = ScrollBarColumns.Value
.ScrollRow = ScrollBarRows.Value
End With
End Sub

As you move the scroll bar, the change event will change the size of the
sheet which will in turn size the chart.

----
Regards,
John Mansfield
http://www.pdbook.com



"Ram Nemesis" wrote:

How can I make a chart which can be zoomed in or out using the mouse or a
button

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
Can a zoom in/out chart be made? Ram Nemesis Charts and Charting in Excel 0 February 7th 05 10:01 AM
Chart formatting Christianovitch Charts and Charting in Excel 1 January 19th 05 10:55 PM
Problem with xlusrgal.xls file Alfred S C Lee Charts and Charting in Excel 2 December 29th 04 05:54 PM
Impedding/Overlaying Charts Phil Hageman Charts and Charting in Excel 4 December 17th 04 07:25 PM
pivot table multi line chart souris Charts and Charting in Excel 2 December 7th 04 03:56 AM


All times are GMT +1. The time now is 07:18 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"