View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Harlan Grove Harlan Grove is offline
external usenet poster
 
Posts: 66
Default Opening Excel in my program

"Paul Reynolds" wrote...
Sort of...

In VB.NET you can use code like:

Public Sub SomeSub(...)
Dim xlApp as Excel.Application

Set xlApp = New Excel.Application
' your VBA code here
xlApp.Quit
End Sub

....

Depending on how good (or not) the garbage collection is, it may be safer to
add a final statement:

Set xlApp = Nothing