bobexcelvb
MIS
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
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