Hi,

Using VB6 with SP6 I have written some software that accesses an excel file. I have compiled and run it on two computers that are on Windows 2000 and it works fine, although they both do have VB6 installed so I don't know the relevance of that.

The problem comes when I run it on XP (tried 2 seperate PCs) . I get an invalid page error come up at this point of the program...

##############################################
Dim xlApp As Excel.Application
Dim wb As Workbook
Dim ws As Worksheet
Dim var As Variant

Set xlApp = New Excel.Application

Set wb = xlApp.Workbooks.Open("c:\dump\" & txt_jn & ".xls")
Set ws = wb.Worksheets("Sheet1")
##############################################

Obviously the relevant folders and files are in place on the PC.

I am referencing "C:\Program Files\Microsoft Office\Office10\excel.exe" but I note that on the pc with XP it is in fact C:\Program Files\Microsoft Office\Office\excel.exe.

Is this the likely cause and if so what can I do to get around this?