Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Posts
    8

    Unanswered: Set Tools>>Options>>General within the Excel VBE by Code

    Hi Everybody !

    Does anybody know if it is possible to set Tools>>Options>>General within the Excel VBE by Code ? (the equivalent of application.setOptions in Access)


    Thanks !

  2. #2
    Join Date
    Oct 2003
    Posts
    1,091
    Howdy!

    Easy way to check on something like this is to record a macro and go through the steps and options you want to set. Then check the VB Editor to determine how each was obtained.
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  3. #3
    Join Date
    Jul 2003
    Posts
    8

    Recording a Macro doesnt work

    Hi !

    thanks for the support, but this doesnt work. The macro recoder wont do it ...

    regards,

    boris

  4. #4
    Join Date
    Oct 2003
    Posts
    1,091
    Since I've not done any VB in Access, I'm not sure what application.setOptions does. Looking in the Help files for SetOptions in Access, it appears that some of the items can be done using other menu items in Excel.

    What exactly are you trying to do? For instance, if you want to set the page margins, etc.
    Code:
    Sub PgSet()
        With ActiveSheet.PageSetup
            .PrintTitleRows = ""
            .PrintTitleColumns = ""
        End With
        ActiveSheet.PageSetup.PrintArea = ""
        With ActiveSheet.PageSetup
            .LeftHeader = ""
            .CenterHeader = ""
            .RightHeader = ""
            .LeftFooter = ""
            .CenterFooter = ""
            .RightFooter = ""
            .LeftMargin = Application.InchesToPoints(0.5)
            .RightMargin = Application.InchesToPoints(0.5)
            .TopMargin = Application.InchesToPoints(0.5)
            .BottomMargin = Application.InchesToPoints(0.5)
            .HeaderMargin = Application.InchesToPoints(0.5)
            .FooterMargin = Application.InchesToPoints(0.5)
            .PrintHeadings = False
            .PrintGridlines = False
            .PrintComments = xlPrintNoComments
            .PrintQuality = 600
            .CenterHorizontally = False
            .CenterVertically = False
            .Orientation = xlPortrait
            .Draft = False
            .PaperSize = xlPaperLetter
            .FirstPageNumber = xlAutomatic
            .Order = xlDownThenOver
            .BlackAndWhite = False
            .Zoom = 100
            .PrintErrors = xlPrintErrorsDisplayed
        End With
    End Sub
    Last edited by shades; 05-24-04 at 16:25. Reason: Clarification
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

Posting Permissions

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