+ Reply to Thread
Results 1 to 2 of 2

Excel Macro Security - Userforms

  1. #1
    Registered User
    Join Date
    10-18-2012
    Location
    Surrey, BC
    MS-Off Ver
    Excel 2016
    Posts
    84

    Excel Macro Security - Userforms

    Hi there,
    I have workbook I created that hides the excel application and opens one of my userforms... everything works as expected except for the first time it is run on another computer.

    My issue is that on a first time run, due to Excel security settings... Excel asks if you want to enable macros and/or enable content, after clicking enable, Excel errors on the code line that makes the userform visible.

    If I close Excel, end the Excel process on windows and open the Excel workbook again... everything is fine.

    What I am wondering, is there a way to check to see if macros and content have been enabled for this workbook? If not, do not open userform... goto another sheet for manual button click to the userform. If it has been enabled, run normally. This is a workbook that will have regular updates... so it will become a first time run often.

    Changing the security settings in Excel isn't an option as our company requires it.



    All additional computers are running Windows 7 with Microsoft Office Professional Plus 2010.

    Thanks in Advance...
    CraigsWorld

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Excel Macro Security - Userforms

    Quote Originally Posted by CraigsWorld View Post
    What I am wondering, is there a way to check to see if macros and content have been enabled for this workbook?
    No.

    The standard way of getting around this is always showing such a message, but using VBA to hide it straight away. If macros are not enabled, the message will stay in place.
    It's not ideal and a birrova fudge, but due to Microsoft security concerns, it is the only way to go.

    HTH

    DominicB

+ 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. [SOLVED] security issues or providing security for macro enabled files
    By thara.p24 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-12-2014, 05:12 AM
  2. Security userforms vba
    By dmartinez in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2011, 02:14 PM
  3. Security in Excel 2003 Macro
    By greaseman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-14-2008, 11:27 AM
  4. Excel macro security not working?
    By wizerhoard in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-23-2007, 07:15 PM
  5. [SOLVED] Macro needed to set macro security in Excel to minimum
    By Carl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2006, 11:40 AM

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