View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Torsten Hannerfeldt Torsten Hannerfeldt is offline
external usenet poster
 
Posts: 1
Default Open password protected database

Hello!
How do I open a connection to a password protected access database? I'm not
using user level protection, only the database itself is protected.

Public cn As ADODB.Connection

Public Sub ConnectToDatabase()
Set cn = New ADODB.Connection
cn.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = "
& _
strDBPath & "db1.mdb;"

cn.Open
End Sub