Automation object error when going from lotus notes to excel 97
Hello this is a part of my code.
I am in Lotus Notes and in LS i'am trying to create and manipulate all sort of things in an excel file.
The lotus notes program works on the server but the clients my have office2000 (excel.9) or office97 (excel.8). The code works perfect for office 2000 but gives the error message " automation object error " in the line Excel.visible for an office 97. What i think is strange is that the errormessage comes after the Errorhandling part ( If Err Or( Excel Is Nothing) Then )
Is there a simple workaround?????
the code :
Dim Excel As Variant
Dim xlsheet As Variant
filename = "C:\Addressbook_"+"name"+".xls"
Set Excel = CreateObject("Excel.application")
If Err Or( Excel Is Nothing) Then
Messagebox("oopssss wrong excel version")
>>>>> get stuck here >>>>> Excel.Visible = No
Set xlsheet = Excel.Workbooks(1).Worksheets(1)
xlsheet.Name = "Contacts"