Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    USA
    Posts
    386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro (Excel 2000)

    Is there a a to run a macro automaticlly when a spread sheet opens.

    I am creating a template I can export data to from Access. I would like for the srpeadsheet to format the data, add totals and some other calculation upon being opened.


    Thanks for any help.
    Richard

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

    Re: Macro (Excel 2000)

    Activate the Visual Basic Editor.
    Double click the ThisWorkbook node in the Project Explorer (the treeview on the left hand side)
    Select Workbook from the dropdown list in the upper left corner of the module window.
    Either enter the code you want to run, or call a macro from the Workbook_Open procedure:

    Private Sub Workbook_Open()
    Call MyMacro ' substitute appropriate name
    End Sub

    The Workbook_Open event procedure will be executed automatically each time the workbook is opened.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    USA
    Posts
    386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro (Excel 2000)

    It does not seem to be running the code in this procedure. Is there an option that can be turned on/off that would prevent it from running the code?
    Richard

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    USA
    Posts
    386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro (Excel 2000)

    I found it.

    Macro Security...


    Thanks for the help. The Macro is working great now.
    Richard

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

    Re: Macro (Excel 2000)

    Do you have macro security set to high?

Posting Permissions

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