A family of Microsoft relational database management systems designed for ease of use.
Hi Tom,
Thank you for your reply and suggestion I will have a look at that path. I had hoped it would be a question of modifying a connection string buried somewhere in Excel to provide the password, but no luck yet in finding one. At the moment I have started on a VB solution and this code has successfully returned the data from a table called Stocks in an encrypted MS access file called Stocks.accdb.
Sub Get_stocks_table()
Dim strSQL As String
Dim adoRecSet As New ADODB.Recordset
Dim connDB As New ADODB.Connection
connDB.Open ConnectionString:="Provider = Microsoft.ACE.OLEDB.12.0; Data Source=D:\Stocks.accdb; Jet OLEDB: Database
Password=xxxxxxxx"
strSQL = "SELECT * FROM Stocks"
adoRecSet.Open Source:=strSQL, ActiveConnection:=connDB, CursorType:=adOpenDynamic, LockType:=adLockOptimistic
Sheets("Stocks").Select
ActiveSheet.Range("A1").CopyFromRecordset adoRecSet
adoRecSet.Close
connDB.Close
End Sub
But it would be much easier if Excel handled this directly as it does for non-encrypted access databases as I can see a lot of tidying up will be needed for this to work (e.g. deleting all of the spreadsheet data before query is executed)
Paul