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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Code to Zoom in Excel 2000 Page Setup 1

Status
Not open for further replies.
Jul 30, 2004
4
US
In Excel if I go to Page setup - Fit to 1 page wide by blank tall – I cannot use the manual page breaks. If I go back to Page setup after setting this, it set the Adjust to: to the correct % to fit one page wide and all I have to do select the Adjust to: and I can use manual page breaks.
My problem is doing this on a VB macro sheet. I am creating a report spreadsheet from a SQL database and the column widths can slightly change from different data. And I need to set manual page breaks. How do I get the Zoom % when it equals False? The number is on the Setup Page, but if I use the following code, all I get is False and not the number. If after setting it to 1 page wide by blank tall, the Adjust to: is filled in with the correct %, then I should be able to get this number and set the Zoom with the number, or set the zoom to True, which I have been unable to do.
A = Worksheets("Sheet1").PageSetup.Zoom
MsgBox (A)

Thanks
Bob
 
Hi,

Zoom = False is when you use FitToPagesWide & Tall.

Otherwise it is used to Scale.

:)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top