Results 1 to 9 of 9
  1. #1
    arothacker is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2014
    Posts
    43

    Button that enables all macros?

    Is there a way to have a form pop up with a button when you open the database that when you click on the button it enables all macros?

    The issue I'm having is that I have a database on a SharePoint and there is a macro in one of the forms that the user enters information into. If the user doesn't enable macros then the code will not work. Is there a way to "force" the user to do so when they open the database each time?



    Thanks!

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    Please explain what is meant by: there is a macro in one of the forms that the user enters information into

  3. #3
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    There are various ways to help ensure Macros are enabled, such as:

    1. Digitally signing the database, and having the users accept the signature. They only need to do this once, then it will automatically be enabled for them whenever they open the database from that particular computer.

    2. Set-up a Trusted Location from that user's computer. Then, whenever they open any Access databases that reside in that location, the macros will be automatically trusted and enabled.

    3. Set the user's security setting to low (NOT RECOMMENDED!)

    4. Make the database Form and VBA driven, so if VBA/Macros are not enabled, they will not be able to easily work in it. I sometimes use a Splash Screen that the database is set to open to on Startup. This screen has a 10 second countdown (which is VBA driven), then goes to the Main Menu. If macros are not enabled, the countdown never starts, so they are just stuck sitting on the Splash screen. You can place a message on it saying that if this screen doesn't go away, your macros are not enabled!

  4. #4
    arothacker is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2014
    Posts
    43
    To clarify the macro that doesn't work if not enabled: I have a form that prevents duplicate values from being entered so if the user doesn't enable the macros then they will be able to enter duplicates.

    JoeM - I like the idea of having the user electronically sign the database or the splash screen. I want something that anytime they open the database on a new computer it will pop up right away forcing them to enable the macros before starting. How do you set up so that the user electronically signs? Is this something triggered when the database opens?

  5. #5
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Is there a way to have a form pop up with a button when you open the database that when you click on the button it enables all macros?
    I want something that anytime they open the database on a new computer it will pop up right away forcing them to enable the macros before starting.
    I hope you appreciate the irony of those requests. What do buttons have behind them to make them run when clicked? Macros or VBA code!
    In order to do what you want there, you would need Macros/VBA code. If it isn't enabled to start with, those "buttons" wouldn't work! Its kind of a vicious cycle!

    See this for digital signing VBA code: http://office.microsoft.com/en-us/ac...010234562.aspx
    There is a lot of other information that can be found via some Google searches.

    For the Splash Screen, you first need to set you Splash Screen Form as the default start-up Form, as described here: http://office.microsoft.com/en-us/ac...010287518.aspx

    If you decide to go that route, and need help setting up a Countdown, let me know.

  6. #6
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332
    Good stuff Joe!

  7. #7
    arothacker is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2014
    Posts
    43
    For security certificates, does the user have to save a copy in their documents in order to use the database?

    It's on a sharepoint so we want all users to use the same database to have the same information

  8. #8
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Save a copy of what? The database or the certificate?
    You usually elect to install the certificate, and then any project signed with that certificate will work on that computer without the enable macros prompt.
    I don't use Sharepoint, so I really can't speak to that.

  9. #9
    arothacker is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2014
    Posts
    43
    It seems to prompt me to save the database that has the certificate. I think I figured a way around it. I decided to try to use autoexec code that has a form pop up if the macros aren't enabled. Then once they are, it switches to the main menu form.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 11-30-2013, 06:23 AM
  2. Replies: 7
    Last Post: 01-17-2013, 07:20 PM
  3. Replies: 3
    Last Post: 10-20-2012, 09:18 AM
  4. Macros
    By kstyles in forum Programming
    Replies: 2
    Last Post: 07-12-2011, 01:38 PM
  5. vba vs macros
    By RedGoneWILD in forum Access
    Replies: 4
    Last Post: 08-06-2010, 12:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums