
DLL usage - works in Access 97 but not in Access 2000
The following code workst perfectly in Access 97, but
gives an error in Access 2000: 'Cannot find vba332.dll'.
If I give the complete path to the file, Access crashes.
The same function can also be found in vbacv20.dll, wich
comes with Access 2000, but this won't work either.
I'm getting pretty frustrated. Can anyone help.
Thanks,
Arnold
---------------------------------------
Private Declare Function EbExecuteLine Lib "vba332.dll"
(ByVal StringToExec As Long, ByVal Any1 As Long, ByVal
Any2 As Long, ByVal CheckOnly As Long) As Long
Function ExecuteCode(Code As String, Optional CheckOnly As
Boolean) As Boolean
ExecuteCode = EbExecuteLine(StrPtr(Code), 0&, 0&,
CheckOnly) = 0
End Function
Sub test()
Call MsgBox("TJA")
End Sub
Sub ScriptTest()
Call ExecuteCode("test")
End Sub