Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post

    Pagesetup Print Margins (Access 97)

    A client with and old database has asked to have a dataset exported to EXCEL and formated. I have everything working except dealing with the margins in pageset up. In looking at the Excel code generated by maco as a guide for the Access vba, I run in to a problem with xlSheet.PageSetup.LeftMargin = Application.InchesToPoints(0.17), where xlsheet is the sheet I've created, formated and populated in Access. I can't seem to figure out how to get Access to accept the InchesToPoints function and don't know another way to set the margin value.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pagesetup Print Margins (Access 97)

    In Access VBA, Application refers to the Access application unless otherwise specified. Try

    xlSheet.PageSetup.LeftMargin = xlSheet.Application.InchesToPoints(0.17)

  3. #3
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post

    Re: Pagesetup Print Margins (Access 97)

    Exactly right.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •