strange behaviour

P

Patrick Molloy

First, change your code to
EITHER

dim xlApp as Object
set xlApp = CreateObject("Excel.Application")

OR

dim xlApp as Excel.Application
set xlApp = New Excel.Application


In general, the first is safer for web apps in my
experience. For VB apps, use the latter as it is more
efficient plus it givs the developer intellisense

Also, fix the following line

xlApp.Workbooks.Add "C:\abc.xls"

to

xlApp.Workbooks.Open "C:\abc.xls"


remember the syntax !
 

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