Here is the way you can access Microsoft Excel from VB6.0

1. Include the Microsoft Excel 9.0 Library in your project reference (Project menu --> References)

2. Use the following code to get the Excel Application

Dim oXlApp As Excel.Application

Dim oDataFile As Excel.Workbook

Set oXlApp = New Excel.Application

Set oDataFile = oXlApp.Workbooks.Open("c:\sample.xls")

..

you can use all the objects you use in Excel VBA in Vb6.0 now on

Cheers

Shasur

http://www.dotnetdud.blogspot.com