Hello,
I'm struggling with a VBA error at the following line: marked in bold:
Sub test()
Dim strDBName As String
Dim strMessage As String
Dim appAccess As Access.Application
Dim vartest As String
Dim hd As String
Dim hf As String
Dim databasename As String
databasename = "test.accdb"
Dim currentweek As String
strDBName = ThisWorkbook.path & "\" & databasename
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Set appAccess = New Access.Application
With appAccess
.OpenCurrentDatabase strDBName
.Visible = False ' Useful for debugging when true
.Eval ("semaineencours()")
End With
currentweek = appAccess.Eval("semaineencours()")
MsgBox currentweek
With appAccess
.CloseCurrentDatabase
.Quit
End With
End Sub
Here is the error: Run-Time error '429' ActiveX component can't create object
Everything is working well with access 2010 installed. When I run this code in Excel 2010, I've got no issue.
I'm trying to run this same piece of code on a different machine on which I've installed access 2010 runtime.
I'm still facing this error? It is really possible to run excel 2010 vba code with the access 2010 runtime?
I've installe run-tim 32 bit on Win7
Thanks for your help.
Arte
I'm struggling with a VBA error at the following line: marked in bold:
Sub test()
Dim strDBName As String
Dim strMessage As String
Dim appAccess As Access.Application
Dim vartest As String
Dim hd As String
Dim hf As String
Dim databasename As String
databasename = "test.accdb"
Dim currentweek As String
strDBName = ThisWorkbook.path & "\" & databasename
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Set appAccess = New Access.Application
With appAccess
.OpenCurrentDatabase strDBName
.Visible = False ' Useful for debugging when true
.Eval ("semaineencours()")
End With
currentweek = appAccess.Eval("semaineencours()")
MsgBox currentweek
With appAccess
.CloseCurrentDatabase
.Quit
End With
End Sub
Here is the error: Run-Time error '429' ActiveX component can't create object
Everything is working well with access 2010 installed. When I run this code in Excel 2010, I've got no issue.
I'm trying to run this same piece of code on a different machine on which I've installed access 2010 runtime.
I'm still facing this error? It is really possible to run excel 2010 vba code with the access 2010 runtime?
I've installe run-tim 32 bit on Win7
Thanks for your help.
Arte