If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > VBA-Excel accessing an Access file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-01-04, 13:17
mmotizuki mmotizuki is offline
Registered User
 
Join Date: Apr 2004
Posts: 7
VBA-Excel accessing an Access file

How can I connect to an Access file with a security password through an Excel application? The code below connect to an Access file without a password. If I put a password in the Access file, I canīt connect just putting the user and the password (.Open ArquivoAccess, "user", "password").




Public ConexaoAccess As New ADODB.Connection

Function Func_ConexaoAccess(ArquivoAccess As String) As Boolean

Set ConexaoAccess = New ADODB.Connection

Func_ConexaoAccess = False

With ConexaoAccess
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Open ArquivoAccess
End With

Func_ConexaoAccess = True

End Function
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On