penfold1992
Registered User.
- Local time
- Today, 11:40
- Joined
- Nov 22, 2012
- Messages
- 169
I keep getting an error that says "Error Loading DLL"
vba then opens up and highlights this line...
Dim objConn As New ADODB.Connection
so I did a search to see what objConn was and found a little lower down it is referenced in...
objConn.Open ConnectionString
so I went looking at what ConnectionString was.
ConnectionString was in a Different module which is defined as such.
this however is where I dont understand things... I dont understand why this is not working or acceptable?
I know the dll is a library file that is found in an access file which I must reference and I have done that.... so what is the problem?!?!
vba then opens up and highlights this line...
Dim objConn As New ADODB.Connection
so I did a search to see what objConn was and found a little lower down it is referenced in...
objConn.Open ConnectionString
so I went looking at what ConnectionString was.
ConnectionString was in a Different module which is defined as such.
Code:
Public Property Get ConnectionString() As String
Dim nConnectionString As String
Dim mConnectionString As String
Dim ThisYear As String
ThisYear = Year(Now)
mConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=---file location blanked for security---;"
Debug.Print "name of database is..."
' nConnectionString = Replace(mConnectionString, "2012", ThisYear)
ConnectionString = mConnectionString
Debug.Print ConnectionString
End Property
this however is where I dont understand things... I dont understand why this is not working or acceptable?
I know the dll is a library file that is found in an access file which I must reference and I have done that.... so what is the problem?!?!