In the Page Setup of an Excel Worksheet, there is a frame called "Scaling"
There are two option buttons:
1. Auto adjust to [number up/down control]% normal size
2. Fit to: [number up/down control] page(s) wide by [number up/down control] tall.
I need to know how to programmatically set Number two.
Here is what I have. It does not generate any errors, but it also does not work.I also triedVB Code:
bkWorkBook.Worksheets(1).PageSetup.FitToPagesWide = 1 bkWorkBook.Worksheets(1).PageSetup.FitToPagesTall = 1Again, this generated no errors, but also did not work.VB Code:
shWorkSheet.PageSetup.FitToPagesWide = 1 shWorkSheet.PageSetup.FitToPagesTall = 1
The following declarations applyVB Code:
Private bkWorkBook As Workbook Private shWorkSheet As Worksheet




Reply With Quote