Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Access: InchesToPoints problem

Avatar of GPSAddict
GPSAddict asked on
Microsoft AccessMicrosoft Excel
5 Comments1 Solution615 ViewsLast Modified:
I'm creating an excel file with many sheets through code. On each of these sheet I call a sub like this :
Call createxcel(wsheet, app), function that is pated below.
Everything works fine except the InchesToPoints. Any ideas how to fix this ? Thanks
Public Sub createxcel(wsheet As Object, app As Object)    
    With wsheet.PageSetup
        .PrintTitleRows = "$1:$1"
        .PrintTitleColumns = ""
    End With
    wsheet.PageSetup.PrintArea = ""
    With wsheet.PageSetup
        .LeftHeader = "MASTER"
        .CenterHeader = "MASTER - HCS5.XLS"
        .RightHeader = wsheet.Name
        .LeftFooter = "&D"
        .CenterFooter = "&T"
        .RightFooter = "&P"
        .LeftMargin = app.InchesToPoints(0.25)
        .RightMargin = app.InchesToPoints(0.25)
        .TopMargin = app.InchesToPoints(0.5)
        .BottomMargin = app.InchesToPoints(0.5)
        .HeaderMargin = app.InchesToPoints(0.25)
        .FooterMargin = app.InchesToPoints(0.25)
        .PrintHeadings = False
        .PrintGridlines = False
        .PrintComments = xlPrintNoComments
        .PrintQuality = 600
        .CenterHorizontally = True
        .CenterVertically = False
        .Orientation = xlLandscape
        .Draft = False
        .PaperSize = xlPaperLetter
        .FirstPageNumber = xlAutomatic
        .Order = xlDownThenOver
        .BlackAndWhite = False
        .Zoom = False
        .FitToPagesWide = 1
        .FitToPagesTall = 100
        .PrintErrors = xlPrintErrorsDisplayed
    End With
End Sub
Avatar of Chris Bottomley
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answers