+ Reply to Thread
Results 1 to 3 of 3

Update Password Protected Access Table Embedded in Excel

  1. #1
    Registered User
    Join Date
    10-26-2016
    Location
    NY
    MS-Off Ver
    MS Office 2016
    Posts
    25

    Update Password Protected Access Table Embedded in Excel

    I have a workbook that acts as a dashboard for data from an Access database. The Access tables are embedded into the workbook and the dashboard is linked to those tables.

    The problem I have is the Access database is password protected (and needs to stay that way) but when I manually refresh the tables the password I enter (I verified the password is correct) is not accepted.

    2 Questions:
    1. Why won't it accept the Access database password?
    2. Is there a way to auto refresh these tables at the open of the workbook without having to re-enter the password?

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Update Password Protected Access Table Embedded in Excel

    I don't know why it will not accept the password. That's an obstacle you will have to get over yourself.

    If you have a connection to the database, it will show up with the Data -> Connections ribbon. Select the connection you want and click on Properties.

    Make sure the item that says Refresh data when opening the file on the Usage tab is unchecked.

    Go to the Definition tab. Click on the option that says Save Password. There is a problem with this. It will embed the password in clear text in the connection string for all the world to see.

    There is a way around this. The connection string is a semicolon-delimited string. You can use the Split Command to split this up into an array. You can change the password component to match the password you want and then recombine the string with the Join Command.

    So you store the password in a cell on a very hidden page. You create an open workbook event that first changes the connection string to contain the password, runs the query or connection, and then removes the password.

    Make sure you put a password to view the VB project.

    This isn't the world's greatest security, but it is enough to thwart the less-able hackers.

    I'd offer code, but I deal with Oracle databases. I have no idea what an MS-Access connection string would look like.

    This code will at least give you the idea of how to address QueryTables and .Connection
    Please Login or Register  to view this content.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    10-26-2016
    Location
    NY
    MS-Off Ver
    MS Office 2016
    Posts
    25

    Re: Update Password Protected Access Table Embedded in Excel

    Thanks but I discovered the problem was with encryption method Access uses and not Excel.

    In Access you would go to File-Options-Client Settings and change the encryption method to "Use legacy encryption." Then remove the password and add it back on. Then back in Excel I entered the passwords (took first time) and saved those.

+ 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. Trying to update an access table from Excel based on unique ID. rst.Update not working
    By Newbie0924 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2015, 04:15 PM
  2. Replies: 2
    Last Post: 08-09-2014, 06:15 PM
  3. Replies: 1
    Last Post: 07-11-2013, 02:39 PM
  4. Open a password protected Access 2010 Database from a Excel
    By Cherry.P in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-24-2012, 09:09 AM
  5. Excel export to password protected Access DB
    By Kinez101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-25-2011, 11:14 AM
  6. Replies: 0
    Last Post: 10-12-2005, 01:05 PM
  7. Replies: 1
    Last Post: 02-07-2005, 08:06 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