Consulting

Results 1 to 3 of 3

Thread: Workbook_Open Does Not Work

  1. #1

    Workbook_Open Does Not Work

    I have a few spreadsheets that have large macros that create high-level reports in a small window of time by people other than myself. It is imperative that the calculation be set to automatic before they are run to avoid errors (and follow-up questions to me). I inputted the following macro code and tested it. I set the calculation to manual (via Formulas=>Calculation Options), saved the file, then reopened it. The calculation stayed on the setting, Manual. ...

    Any idea why it won't execute when the file is opened? I have the Trust Center setting's radio-button on Enable all macros.

    [vba]Private Sub Workbook_Open()

    With Application
    .Calculation = xlAutomatic
    End With

    End Sub
    [/vba]

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Did you add that code to the ThisWorkbook code module?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Mar 2009
    Posts
    7
    Location
    Hi macro_man,

    Can you confirm that you place the code in "ThisWorkbook" module?

    Danny
    Regards,

    Danny
    Please read this before cross posting!

Posting Permissions

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