View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Childs[_3_] Tim Childs[_3_] is offline
external usenet poster
 
Posts: 7
Default Margin Lines in Print-Preview Mode

Hi

thanks for that. I was hoping the response would definitively say whether
this feature (or property) can be controlled form VBA itself rather than
being turned on at the keyboard.

with apologies to all pragmatists in the newsgroup :)

thanks

Tim


"JLGWhiz" wrote in message
...
This is from VBA help files:

With Worksheets(1).PageSetup
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1.5)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
End With

You just need to be in the correct mode. PageSetup is where the margins
are
set.

"Tim & Sue Childs" wrote:

Hi

Is it possible to programmatically control ahving the print margins
appear
on a print preview. At the moment, I have a print macro and have to press
the "Margins" button (great hardship!!) to get this to happen, but would
like these to be in plae under the control of VBA.

Thanks in advance

Tim