Rudi GOUSSEY
New Member
- Joined
- Jan 8, 2004
- Messages
- 32
I have a excelfile with a macro with reference to msoutl8.olb(office97) which is in a shared drive. This macro is being used by other depts. One dept uses outlook97, another uses outlook98, and another doesn't use outlook. When the first dept uses this macro, it creates an error for them because they have outllook98 and thus changes the reference to msoutl85.olb in their pcs. How can i solve this problem.
I tried this to insert this piece of code in the macro, but this doesn't solve the problem : VBA for Excel97 doesn't know the method References.AddFromFile
….
If Dir("C:\Program Files\Microsoft Office\Office\msoutl8.olb") Then
References.AddFromFile ("C:\Program Files\Microsoft Office\Office\msoutl8.olb")
Else
References.AddFromFile ("C:\Program Files\Microsoft Office\Office\msoutl85.olb")
End If
……
I tried this to insert this piece of code in the macro, but this doesn't solve the problem : VBA for Excel97 doesn't know the method References.AddFromFile
….
If Dir("C:\Program Files\Microsoft Office\Office\msoutl8.olb") Then
References.AddFromFile ("C:\Program Files\Microsoft Office\Office\msoutl8.olb")
Else
References.AddFromFile ("C:\Program Files\Microsoft Office\Office\msoutl85.olb")
End If
……