My db access is always in a diferrent path but in the same folder than my woorkbook.
Private Sub CommandButton14_Click()
Dim cn As Object
Dim rs As Object
Dim strSql As String
Dim strConnection As String
Set cn = CreateObject("ADODB.Connection")
'here I want to use current directory as path for my mdb
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=D:\FicheMacro\PGDB.mdb"
strSql = "SELECT Count(*) FROM AQ_DGE_MOD;"
cn.Open strConnection
Set rs = cn.Execute(strSql)
MsgBox rs.Fields(0) & " rows in MyTable"
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub