pagesetup.zoom problem !!!

O

Olivier

Hi everybody,

I have a problem with this little function, the goal is to apply a zoom
value instead a "FitToPages" value.

When i want to setup the zoom propertie to "True" (this propertie was setup
to false to apply the fit value) i received an error message : "Unable to
define the Zoom propertie for the class PageSetup."
Help !!!!

Here is my function :

Sub ajust()
With Worksheets("Sheet1").PageSetup
.Zoom = False
.FitToPagesTall = 2
.FitToPagesWide = 1
End With
Worksheets("Sheet1").PageSetup.Zoom = True
End Sub

Thanks in advance for your help.

Olivier
 
P

Paul B

Olivier, is this what you need?

Sub ajust()
With Worksheets("Sheet1").PageSetup
.Zoom = 65
End With
End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
 
P

PO

Olivier, if you omit "Worksheets("Sheet1").PageSetup.Zoom = True" all works
fine.
Why do you want to set "Zoom" back to be True when you don't need to?

Regards
PO
 
O

Olivier

Hi,

The goal of my function is to FIT to a number of calculated page and let
excel define the zoom value, and after "un set the page FIT" and use the
zoom value previoulsy retrieved.

But i can't retrieve a zoom value after zoom has been set to false.


Olivier
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top