Hi xlmonkey
If you open the
vb editor window and go to tools and then references you
will see the referenced dlls in the dialog that comes up.
Depending on what you are doing you will have to know which will be ticked
in the list.
You cannot get to this option in debug mode.
you can check for any file at a known path through vba
Sub FileExists()
Dim fso
Dim file As String
file = "C:\Test.xls" ' change to match the file w/Path
Set fso = CreateObject("Scripting.FileSystemObject")
If Not fso.FileExists(file) Then
MsgBox file & " was not located.", vbInformation, "File Not Found"
Else
MsgBox file & " has been located.", vbInformation, "File Found"
End If
End Sub
You could maybe use a shell command through vba to register or unregister
dlls as librarys through vba.
I have done it with regsrv for windows files before but only through
start... run... dialogue in the windows start bar.
Search google forr info on this.
Hope that helps
Rob
"ExcelMonkey" wrote in message
...
How do I test in VBA to see if a particual DLL exists in my references? I
want to test to see if the RegExp library exists and if so I want to check
it
off. If it does not exist I want o generate an error message prompting
the
user that the file is not available in the libraries.
On a side note, I am assuming that the library should be available. Why
would it not be? Is there any reason that xl97 upward would not have
this?
And if it is not available, what are the users options (assuming this may
be
driven by version of Excel). For example, say the user had it but
accidentally deleted it. What would they need to do to restore it?
Thanks