Results 1 to 2 of 2
  1. #1
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Dallas, Texas, USA
    Posts
    1,680
    Thanks
    0
    Thanked 1 Time in 1 Post

    Enable / Disable Macros (Excel 2000)

    When a user opens or starts the excel file "2001 Reporting.xls" and the macro warning msg is presented giving the user the option of enable or disable; Can code be inserted that would simply close the file if the user selected DISABLE? The program is useless without it's macros and it opens it up to mischief. So if they choose not to enable macros, then I don't want them to have access to the file!
    - Ricky

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Enable / Disable Macros (Excel 2000)

    Ricky,

    Once macros are disabled code cannot run. The option to disable macros is for security purposes and it would be pointless having the disable feature if code could still run. Probably your best solution is hide all sheets bar one, and when the file is opened run code to unhide them. If macros are disabled the code will not run and your sheets will remain hidden. Of course when the file is being closed the reverse would have to take place. If you have a lot of worksheets, this might effect performance.

    Andrew C

Posting Permissions

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