ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   DCOM98 and EXCEL2000 collision (https://www.excelbanter.com/excel-programming/271890-dcom98-excel2000-collision.html)

patrick molloy

DCOM98 and EXCEL2000 collision
 
try changing the first two line from

Dim xl As Excel.Application, i as Integer
Set xl = New Excel.Application


to

Dim xl As object, i as Integer
Set xl = createobject("Excel.Application")


Patrick Molloy
Microsoft Excel MVP


-----Original Message-----
I've written a short procedure in VS6, which opens a

new
Excel2000 application and populates a Range object:

Private Sub Populate()
Dim xl As Excel.Application, i as Integer
Set xl = New Excel.Application
xl.Visible = True
xl.Workbooks.Add
For i = 1 To 100
xl.Cells(i, i) = i ^ 2
Next i
Set xl = Nothing
End Sub

It works perfectly under WindowsXP and Windows98. But

if
you have DCOM98 installed on W98 OS, it breaks on
xl.Cells(i, i) = i ^ 2
row, messaging an AUTOMATION ERROR -2147417848(80010108).
It works exactly the same way with or without

Office2000
SP3, and from a VBA module of MS Office2000.

Thanks for any suggestion why this could happen!

Milko Koparanov
.



All times are GMT +1. The time now is 08:08 AM.

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