Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set ZOOM on Chart in Excel 1

Status
Not open for further replies.

tbg130

Programmer
Aug 11, 2004
46
CA
Hi All,

I have created a workbook that summarizes a variety of data. It creates 'charts' based on data on 'worksheets'. I'd like to set the zoom on the 'charts' window (not the pagesetup for printing) but am not having luck and when it does work, it leaves an Excel Process running....

Code I was trying was something like:

ActiveChart.Window.Zoom = 75

Also tried:

objBook.Charts(ChartName).Zoom = 75

Any help would be appreciated...

Thanks,

Tyler
 
Hi,
Code:
ActiveWindow.Zoom = 75
Check the Object Browser with zoom.

Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 
it leaves an Excel Process running
Are you doing that with OLE automation ?
If so, don't use any implicit reference to the Excel.Application object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi All,

Thanks for the help PH and SkipVought... Unfortunatley, I'm unable to get the zoom function to work... I still get an error so I'm not sure what I'm doing wrong... Could you think of any other solutions or recommendations for this?

Appreciate your help in advance!

Tyler
 
I still get an error
Any chance you could post the whole error message and the highlighted code when in debug ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
try

Application.window.zoom = 75

Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 

What are you trying to do here? And how do you do it in Excel (without VBA)?

All I can do (in Excel 2000) is Zoom a Chart Sheet - and that just by zooming the (Application) Window.

Although the zoom is maintained by Sheet, there doesn't seem to be any way to set it (or query it) when the Sheet is not active, so make your chart active and ..

[blue][tt] ActiveWindow.Zoom = 75[/tt][/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
Hey All,

Here is some of my code:

'Set Chart Titles
With objbook.Charts(newchartName)
.HasTitle = True
.chartTitle.Text = thechartTitle
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = xAxisTitle
.Axes(xlCategory).HasTitle = True
.Axes(xlCategory).AxisTitle.Characters.Text = yAxisTitle
End With

With objbook.Charts(newchartName)
.HasAxis(xlCategory, xlPrimary) = True
.HasAxis(xlValue, xlPrimary) = True
End With


I JUST can't get the ActiveWindow.zoom to work!!! I tried with objbook.sheets(sheetnaem).selct, then active window but it tells me remote server does not exist...

Ideas?

Tyler
 
Have you tried this ?
objbook.Application.ActiveWindow.Zoom = 75

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top