Well it's not MDAC as I did an install of MDAC on one of the computers and
it still fails. I would however like to find out out to automatically
install MDAC as part of the deployment package if that's possible.
The problem is definitely a missing reference as I'm calling the included
code on startup. However, when it runs and takes the IsBroken path (On Error
Resume Next is commented) it blows up with "... There was a problem
referencing the property or method of the object ..." and doesn't identify
the missing reference. I forced the IsBoroken path by creating a missing
reference on the XP machine and it works fine, just not on the 98 or ME
machines. I did manually verify all of the references on the 98 machine and
unless I Missed one they all seemed to be correct. If I put the On Error
Resume Next I just get the message "1 Unresolved References encountered"
upopn completion. I don't think it likes refItem.FullPath.
So now I have 2 problems! How to automatically upgrade MDAC with the
deployment package and why the reference check is failing. Any ideas??
TIA
Vic
Function ReferenceInfo()
Dim strMessage As String
Dim strTitle As String
Dim refItem As Reference
Dim iErrors As Integer
Dim strBadRef As String
On Error Resume Next
iErrors = 0
For Each refItem In References
If refItem.IsBroken Then
strBadRef = "Missing Reference:" & vbCrLf & refItem.FullPath
MsgBox "Missing Reference:" & vbCrLf & refItem.FullPath _
& vbCrLf & vbCrLf & "A critical element of the application is
missing" _
& vbCrLf & "from your computer. Contact support with " _
& vbCrLf & "the missing reference information identified
above.", vbCritical, "Show Secretary"
iErrors = iErrors + 1
Else
strMessage = "Reference: " & refItem.Name & vbCrLf _
& "Location: " & refItem.FullPath & vbCrLf
End If
Next refItem
If iErrors = 0 Then
Else
MsgBox iErrors & " Unresolved References encountered." & vbCrLf &
vbCrLf & strBadRef
End If
End Function