Pagesetup Property error in excel

Joined
Jun 2, 2006
Messages
2
Reaction score
0
hi

i am getting the following error while setting page property for excel
here i am giving the code which i am using in the application


Error:
1004- Unable to set Zoom property of the PageSetup class

Code:

'Setting Fit to Page
With xBook.Worksheets(1).PageSetup
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 9999
End With

'Show the file
xApp.Visible = True


Previously it was working fine.
but suddenly the error is poping up

i have several aother excel reports to generate like this
even in those things if i set orientation property or fitToPagesTall
before zoom

i am getting 1004- Unable to set Orientation property of the PageSetup class

please guide me on this

thanks in advance
 

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