+ Reply to Thread
Results 1 to 3 of 3

Problem with excel security settings causing UserInterFaceOnly to not work

  1. #1
    Registered User
    Join Date
    11-09-2010
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    32

    Problem with excel security settings causing UserInterFaceOnly to not work

    Hi,

    I have a workbook that has the following code in the "This Workbook" page

    Please Login or Register  to view this content.
    This code protects every sheet but allows macros to run. It seems to work fine when I open the workbook from my documents as this is a trusted source in my excel settings.

    The problem is that when I send it to other users, the excel security warning that disables 'Active content' etc seems to stop this from working properly. Even if the user clicks 'enable this content', they get 'run-time error 1004 - unable to set the Hidden property of the Range class'

    As I understand it, the UserInterfaceOnly: = True code allows macros to run on protected sheets. It appears that the excel security settings that initially prevent the macros from running has also prevented my workbook open event from running.

    Any idea how to stop this? The workbook has a lot of macros so adding in an 'Unprotect - protect' to each one would be very impractical.

    Thanks in advance for any help.

    Gareth
    Last edited by shg; 01-24-2011 at 01:23 AM. Reason: fix code tags

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Problem with excel security settings causing UserInterFaceOnly to not work

    You can't "make" people turn on macros to see/use your sheets. You can only ask them to.

    Many people make it unfruitful for people to disable macros by causing the workbook that opens with no macros enabled be useless. The most common trick being to hide all sheets in the workbook except a single "splash screen" sheet with nothing more on it than a message saying "Macros are disabled thus nothing will appear in this workbook."

    If macros are enabled, the wb_open events would include action that unhides all the activity sheets and hides the "splash screen sheet".

    If you Google "Excel VBA Force Macros" you'll find 100s of ready to try explanations/solutions.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Problem with excel security settings causing UserInterFaceOnly to not work

    It seems to be a problem in your code, without seeing the workbook & code it's difficult to assess
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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