View Single Post
  #12   Report Post  
Posted to microsoft.public.vb.general.discussion,microsoft.public.excel.programming
Steve Gerrard[_2_] Steve Gerrard[_2_] is offline
external usenet poster
 
Posts: 4
Default Excel automation: Why my code is hijacked?

Dave Peterson wrote:
I should have been more explicit.

My point was since he was using this:

Set moExcelApp = CreateObject("Excel.Application")
instead of
Set moExcelApp = new Excel.application

why not just stick with late binding and drop the reference
completely and declare those variables as Objects?



He would lose intellisense, and have to look all the parameters up to be sure
they were correct, or wait for runtime errors. Also late binding all the calls
would slow the performance down quite a bit. The advantage of using create
object with Excel is that it is not version specific.

Back to the original post, shouldn't there be a
moExcelApp.Quit
before the
Set moExcelApp = Nothing
or is that not needed?