excel 2003 and VB.NET

M

Maileen

Hi,

for several years i used the following code without any trouble. But it
seems that under VB.NET and with Excel 11 COM, it has some issues.

here is the code :
Public xlApp As Excel.Application
Public xlWB As Excel.Workbook
Public xlWS As Excel.Worksheet

'-----------------------------------------
' OpenXLSFile
'-----------------------------------------
Public Function OpenXLSFile(ByVal ExcelFile As String)
xlApp = New Excel.Application
xlApp.Visible = True
xlWB = xlApp.Workbooks.Open(ExcelFile)
...
xlWB.Close()
xlWB = Nothing
xlApp.Quit()
xlApp = Nothing
End Function

problem occue on Open function.
does anyone know why ?
i've never seen that.
thanks a lot,

Maileen
 

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