+ Reply to Thread
Results 1 to 10 of 10

Excel 2010 - Lock out Trust Center settings for Disabling All Macros?

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Here
    MS-Off Ver
    Excel 2010
    Posts
    119

    Excel 2010 - Lock out Trust Center settings for Disabling All Macros?

    Hello,

    There are some excel documents in a hidden folder that contain sensitive information. Shortcuts to these documents will be provided to users to open them and add data. These documents contain all kinds of macros as well. Once macro disables the 'Save As' feature so that the workbook can not be saved outside of the hidden folder, preventing to some degree a user from saving as a different name and emailing the document with the sensitive data.

    This all works fine with Macros enabled. As soon as macros are disabled the 'Save As' prevention is bypassed and the workbook can be saved anywhere.

    Is there a way for an administrator to lock out the Trust Center options for disabling all macros?

    Thanks for any help.

    TV

  2. #2
    Forum Contributor
    Join Date
    12-19-2012
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: Excel 2010 - Lock out Trust Center settings for Disabling All Macros?

    Hi,

    Not sure about any way of stopping users from disabling macros.

    However I had a similar issue which I resolved by by using an BeforeSave event that will set a workbook to a closed & password protected state which will not allow a user to do anything on the workbook until macros are enabled.

    For example all worksheets are hidden apart from the open state worksheet that has a message saying TURN ON YOUR MACROS TO PROCEED! Unless they know the password to unlock worksheets/Workbook they cant get passed this 1st open page.

    If they have macros are already on I use a on open event to hide the open state worksheet and un hide all others.

    Hope this helps

    Regards
    Steve

    P.S. Not wishing to throw more misery your way but if you send a shortcut to people surely they could just paste the file path from the properties of the shortcut into their address bar minus the file name then, from there (inside hidden folder) right click copy and paste that excel file....
    Last edited by Steve@Rugby; 03-12-2014 at 11:57 AM.

  3. #3
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Here
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Excel 2010 - Lock out Trust Center settings for Disabling All Macros?

    Hi Steve,

    That's a pretty simple solution. So I guess you are using the xlVeryHidden function to hide all sheets except the one with the message to turn on macros, everytime the workbook is closed. So if macros turned on, the Open_Workbook() macro will take care of showing all the hidden sheets and hiding the one with the message to turn on macros.

    I like it, I will give it a try.

    Thank you for your input.

    As for the method to use the shortcut to prevent copies of the document leaving the premises, I knew it's not ideal and there are holes in it. I did not consider the file path as you mentioned so thanks for the heads up. As well, someone can just copy and past a sheet into another document. It's probably impossible to prevent any type of data leakage.

    What approach if any might be commonly used to prevent data leaving the building when using Excel?

    TV

  4. #4
    Forum Contributor
    Join Date
    12-19-2012
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: Excel 2010 - Lock out Trust Center settings for Disabling All Macros?

    Hi TV,

    No I'm using "Sheets("Sheet1").Visible = False" & Sheets("Sheet1").Visible = True. This is fine if you protect the workbook as well as the worksheets as a user cant unhide a hiden worksheet unless they have the password.

    Regarding copy and paste:
    If you protect the worksheets, in the protect worksheet options you can stop anyone selecting protected cells so they cant copy them. I use this method and populate the worksheets with a userform which unlocks worksheets with code, pastes data in, then locks worksheets again. However even with this they could still just do a screen print!

    Another option you may consider is populating the workbooks with sensitive data by using an external workbook that populates the sensitive workbook using some code. This way they would never see the sensitive data in the master workbook.

    Regards
    Steve

  5. #5
    Forum Contributor
    Join Date
    12-19-2012
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: Excel 2010 - Lock out Trust Center settings for Disabling All Macros?

    Here are some example codes that I am using, I hope they will help:

    In ThisWorkbook:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    In a standard Module:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by Steve@Rugby; 03-13-2014 at 08:41 AM.

  6. #6
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Here
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Excel 2010 - Lock out Trust Center settings for Disabling All Macros?

    Steve, thanks so much for sharing your code examples. I have password protected sheets with locked cells and this should be pretty easy to implement.

    I don't quite understand why Microsoft does not allow for an admin to control the settings for enabling and disabling macros, especially since malicious code can be run. Would it not make sense to have that functionality? A user would not be able to turn off macros, disabling the functionality of workbooks and they would not be able to enable 'all macros' which could end up running malicious code.

    Cheers,

    TV

  7. #7
    Forum Contributor
    Join Date
    12-19-2012
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: Excel 2010 - Lock out Trust Center settings for Disabling All Macros?

    Hi TV,

    Appears you may be able to get what you want, quote below from Microsoft website:

    You can change macro security settings in the Trust Center, unless a system administrator in your organization has changed the default settings to prevent you from changing the settings.
    HTML Code: 
    The only thing is, I cant find how you do this!

    Regards
    Steve

  8. #8
    Forum Contributor
    Join Date
    12-19-2012
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: Excel 2010 - Lock out Trust Center settings for Disabling All Macros?

    Hi,

    Looks like you may need to take this to another forum (not excel forum), although not sure which one. Or if youre lucky enough to have one, a good IT department ?

    Quote below is again from Microsoft website:

    Some users may not be able to change Trust Center settings due to group security policies in their organizations. In such cases, you need to contact the IT administrator for your organization.

    Regards
    Steve

  9. #9
    Forum Contributor
    Join Date
    12-19-2012
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    135

    Re: Excel 2010 - Lock out Trust Center settings for Disabling All Macros?

    Hi,

    This is all beyond my knowledge but it may help set you on your way.

    HTML Code: 
    Please let me know how you get on, I would be very interested if you did succeed.

    Regards
    Steve

  10. #10
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Here
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Excel 2010 - Lock out Trust Center settings for Disabling All Macros?

    Thank you very much Steve,

    HTML Code: 
    We have an IT guy that comes in from time to time, maybe he will know more about OCT or maybe someone else here on these forums may know.

    Cheers,

    TV

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Unable to change trust Center Settings
    By joeller in forum Excel General
    Replies: 0
    Last Post: 02-28-2014, 04:14 PM
  2. Excel 2010 Trust Center - How to Un-Trust
    By PosseJohn in forum Excel General
    Replies: 3
    Last Post: 08-04-2013, 01:57 PM
  3. Trust Center functionality and usage
    By djkirk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2012, 02:04 PM
  4. [SOLVED] One of the Settings in Options Trust Center Settings is Grayed out
    By zit1343 in forum Excel General
    Replies: 2
    Last Post: 06-28-2012, 09:18 AM
  5. Excel 2007 : Cant get trust center
    By amsanborn in forum Excel General
    Replies: 4
    Last Post: 07-22-2010, 12:39 PM

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