Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Gunnar Johansson
 
Posts: n/a
Default Fill screen with chartobject by zooming?

Hi,

I have chartobjects in a worksheet and try to make code with commandbar
buttons to jump to different chartobjects and zoom in the chartobject to
fill the whole screen. Surley this can be done?

The command button code is not a problem, it is the zoom 'n fill part that
bother me...You have to consider different screens, resolutions etc. give
different size, I guess.

I'm unexperienced of coding zooming and hope you can give me hints or more
to solve this.

/Thank you in advance



  #2   Report Post  
Jon Peltier
 
Posts: n/a
Default

Gunnar -

This macro will zoom an embedded chart to fill the screen.

'-----
Sub ZoomChart(cht As Chart)
Dim rZoom As Range

With cht.Parent
Set rZoom = ActiveSheet.Range(.TopLeftCell, .BottomRightCell)
End With

rZoom.Select

ActiveWindow.Zoom = True
End Sub
'-----

Run the code like this:

ZoomChart ActiveChart

or

ZoomChart oChartObject.Chart


- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Gunnar Johansson wrote:

Hi,

I have chartobjects in a worksheet and try to make code with commandbar
buttons to jump to different chartobjects and zoom in the chartobject to
fill the whole screen. Surley this can be done?

The command button code is not a problem, it is the zoom 'n fill part that
bother me...You have to consider different screens, resolutions etc. give
different size, I guess.

I'm unexperienced of coding zooming and hope you can give me hints or more
to solve this.

/Thank you in advance




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
Fill area beneath a scatter plot JZip Charts and Charting in Excel 4 December 8th 04 01:59 PM
How can I change size of the picture without changing chartobject? Marie J-son Charts and Charting in Excel 6 December 7th 04 12:34 PM


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