Hello

I had the below code running on Access 97 and Excel 97. When I upgraded
to Access 2000 and Excel 2000 it stopped working. Giving me a message
saying: "OpenText method of Workbooks class failed".

Is there a way to correct this issue? or should I upgrade only to
Access 2000 and keep Excel 97.

Thank you all
Elie Constantine


Private Sub ConvertUsingExcel(FromFile As String, ToFile As String,
Optional Origin As Integer = 2)
Dim objExcel As Object
Dim i As Integer
Dim s As String

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.workbooks.opentext FileName:=FromFile, Origin:=Origin,
StartRow:=1 _
, DataType:=1, TextQualifier:=1, ConsecutiveDelimiter:=False, _
Tab:=False, Semicolon:=False, Comma:=True _
, Space:=False, Other:=False