Well, there are probably a couple of ways to handle this. As I don't
know any code to check if a referenced DLL is actually loaded in memory
in VBA, I'll tell you the late-binding method.
Dim obj As Object
On Error Goto EH_ClassNotFound
Set obj = CreateObject("MyProject.Class1")
'Class was instantiated correctly, therefore things should be okay
'Place code here
Exit Sub 'Or Function, or Property
EH_ClassNotFound:
MsgBox "MyProject DLL not loaded!", vbCritical or vbOKOnly
What is being done here is an object is created. The object can be
instatiated as basically anything type of object. Use CreateObject to
dynamically get an instance of an object; if it fails, you'll get an
error 429, which is been trapped by using the On Error Goto
EH_ClassNotFound (you could go even further and make sure the error
number really is 429, but we won't go that far). If you don't get an
error, all is well and you can proceed with your code.
Good luck.
Jay Taplin MCP