View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
kiat kiat is offline
external usenet poster
 
Posts: 34
Default VB6, Excel, Win Version conflicts????

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.

";-)" wrote in message
...
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?