View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Page margins on Page break preview

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.


"Jess" wrote in message
...
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?