ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB6, Excel, Win Version conflicts???? (https://www.excelbanter.com/excel-programming/275175-vb6-excel-win-version-conflicts.html)

-\)

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?



kiat

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?





-\)

VB6, Excel, Win Version conflicts????
 
Thanks this seems to explain the problem.


Here's more info which may be relevant:
http://support.microsoft.com/default...b;en-us;242375
The link was originally posted by guru Tom Ogilvy.

keep me posted if things improve
....kiat

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








All times are GMT +1. The time now is 12:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com