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

Trouble using FitToPagesWide 1

Status
Not open for further replies.

Mugs321

Programmer
Jan 31, 2007
49
CA
Hey all,
I have an 'Excel Export' function in my current project. The only problem is that the last column wants to print on separate pages. In an attempt to automatically fit the columns on to one page, I tried using the following code:

oSheet.PageSetup.FitToPagesWide = 1

When I create the excel file through Access and view the 'Page Setup', there is a '1' in the 'Fit To: # Pages Wide' textbox, however, the radio button besite 'Fit To:' is not selected.

As such, there is no change to the way the file prints.

What am I doing wrong?
 
With oSheet.PageSetup
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With

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

Part and Inventory Search

Sponsor

Back
Top