VB6, Excel, Win Version conflicts????

;

;-\)

I am having a problem porting a VB6, Excel, Access project from one Win 2K
machine to another.

The project is created on a Win XP pro machine with Office 02 (10) now
installed. The project was started with Office 97 on all machines. The
main data is supplied thru client created Excel files, these are in various
versions almost all are either 97 or 2000 files.

The original client PC has Win 2K & Office 97 & VB6 installed with operator
having admin rights on the machine and without corp. IT control.

The new client PC is Win 2k, Office 2000 with tight IT control. After the
first install all went well.

Now after I have had to change the main EXE file I get a access denied error
to memory location 0x000000.

I was able to get admin rights to debug with and still got the same results.
I have changed no code that has to deal with this. The error occurs when my
code is doing ...

For i = 1 To rsMaster.RecordCount
Set xl(i) = New Excel.Application
With xl(i)
.Application.WindowState = xlMinimized
.Workbooks.Open FileName:=(rsMaster!pathExcelSource),
UpdateLinks:=0, ReadOnly:=False
.Visible = True
End With
rsMaster.MoveNext
Next i
rsMaster.Close

I am referencing OLE Automation, ActiveX Data Objects 2.0, Excel 10.0
Objects, Access 10 Objects, ...


Any ideas?
 
K

kiat

I wonder if you have late or early binding for the excel object, which
depends on how you declare the xl variable. There are some issues on this
you can read up in the MSDN. Try reversing the binding and see if things
improve.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top