Results 1 to 5 of 5

Need help with bypassing an Access password prompt when running a macro from Excel

Threaded View

  1. #1
    Registered User
    Join Date
    07-09-2014
    Location
    Naperville, IL
    MS-Off Ver
    office 2013
    Posts
    29

    Need help with bypassing an Access password prompt when running a macro from Excel

    Hello,

    I currently have a macro set up in Excel which calls a macro within an Access database which is linked to my excel tables. The only issue is that when the Access database opens, it asks for a password which I have to manually enter. I would like end users to be able to come in and refresh the queries without having to enter a password. Is there a way to bypass this through VBA? Here is my current code:

    I appreciate the help.

    Sub accessrunmacro()
    
    Dim A As Object
    Set A = CreateObject("Access.Application")
    A.Visible = False
    A.OpenCurrentDatabase ("database location.mdb")
    A.DoCmd.RunMacro "macro name"
    A.CloseCurrentDatabase
    A.Quit
    Set A = Nothing
    
    End Sub
    Moderator Message: Please use code tags when providing VBA. I have added them for you today as you are new to the forum. Please read our rules and comply in the future.
    Last edited by alansidman; 12-04-2014 at 07:09 PM. Reason: code tags added.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel userform- prompt password to access sheet 3
    By PANTECH in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-25-2013, 12:55 PM
  2. Running or bypassing code in a macro based on a certain condition...
    By kenab1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-17-2010, 04:03 PM
  3. password protection-is there anyway to put a password on running a macro in excel?
    By Solarissf in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2008, 10:06 AM
  4. Bypassing Excel's FTP login/password dialog
    By tmant in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2008, 03:48 AM
  5. Replies: 0
    Last Post: 07-13-2006, 03:15 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