have this error:"Run-time error '3706'"

on windows 7 64bit、Excel  2010 64bit
have this error:"Run-time error '3706'"
my code:
Public Function AccessAdoConn(Optional dbname As String) As Object
    Dim AccessConn As Object
    Dim conStr As String
    Dim strProvider As String
        dbname = ThisWorkbook.Path
        dbname = IIf(Right(dbname, 1) = "\", dbname, dbname & "\") & "DB.mdb"
    strProvider = "Provider=Microsoft.Jet.OLEDB.4.0; "
    conStr = strProvider & "Data Source=" & dbname
    Set AccessConn = CreateObject("ADODB.Connection")
    AccessConn.ConnectionString = conStr
    AccessConn.Open
End Function
Answer
Answer

You may post your query in the link given below and check if it helps:

http://social.technet.microsoft.com/Forums/en/officeitpro/threads

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated November 29, 2024 Views 2,175 Applies to: