+ Reply to Thread
Results 1 to 2 of 2

prevent workbook from open if user does not enable macro

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,176

    prevent workbook from open if user does not enable macro

    Is there a way to force a user to enable macros to open a workbook? I did try writing a piece of code that what close the workbook if they disabled macros but realized it wouldn't work if macros are disabled. Thanks in advance for any comments.
    Last edited by maacmaac; 03-30-2011 at 09:24 PM.

  2. #2
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: prevent workbook from open if user does not enable macro

    Create a sheet that says "You must enable macros to open this workbook", followed by instructions on enabling macros. Then you hide all sheets except the instruction sheet. Then you can protect the workbook structure with a password.

    In your Workbook Open event, you unprotect the workbook and unhide the desired sheets and hide the instruction sheet. Just make sure to add a routine to do the opposite in the workbook close event.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1