Page margins on Page break preview

J

Jess

I have an access database that creates an excel worksheet from scratch.
Access basically places text, pictures, and shapes on the excel worksheet. My
whole excel sheet fits into one page. For some reason excel creates two pages
separated by a vertical blue dashed line, the second one right of the first
one.

How can I programmatically adjust the position of the straight and dashed
blue lines on shown on page break preview?

I have tried the rightmargin and leftmargin commands and this does not seem
to work. When I increase the size of the left page by reducing the right and
left margins with the above commands, I increase the width of the left page
and I decrease the width of the right page. However, excel still shows the
right page –but more narrow- separated from the left page by a vertical
dashed line.

How can I programmatically adjust the position of these straight and dashed
blue lines?
 
J

JLGWhiz

Without seeing the actual file, I am guessing that you want:

FitToPagesWide = 1
FitToPagesTall = 1

Look these up in VBA help and see if that will solve your problem.
 

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