blairacuda
Technical User
Hello Gurus,
i've got an app that uses excel as its reporting component. in our excel templates we have a macro to execute a bunch of different stuff. when users try to "reload" an older report (reload pushes new data into an old report) we check the macro version and if required, delete it then import the new version.
the following code gives us this ability (trimmed down sample):
Set XL = Excel.Application
Set WB = XL.Workbooks.Open(WORKBOOK_NAME, False)
Set VBP = WB.VBProject
With VBP
For i=1 to .VBComponents.Count
If .VBComponents(i).Name = WHATEVER
--execute version check and import stuff if necessary--
End If
Next i
End With
WB.Save
WB.Close
XL.Quit
Set XL = Nothing
Set WB = Nothing
For some reason the XL.Quit is not killing the process. I can still see Excel.EXE running in Task Manager after this code is executed; it only goes away once I close my program.
I can't seem to figure out what I am doing wrong.
Thanks for any help in advance.
CBlair
Crystal, InstallShield, branching out in other programming realms.
i've got an app that uses excel as its reporting component. in our excel templates we have a macro to execute a bunch of different stuff. when users try to "reload" an older report (reload pushes new data into an old report) we check the macro version and if required, delete it then import the new version.
the following code gives us this ability (trimmed down sample):
Set XL = Excel.Application
Set WB = XL.Workbooks.Open(WORKBOOK_NAME, False)
Set VBP = WB.VBProject
With VBP
For i=1 to .VBComponents.Count
If .VBComponents(i).Name = WHATEVER
--execute version check and import stuff if necessary--
End If
Next i
End With
WB.Save
WB.Close
XL.Quit
Set XL = Nothing
Set WB = Nothing
For some reason the XL.Quit is not killing the process. I can still see Excel.EXE running in Task Manager after this code is executed; it only goes away once I close my program.
I can't seem to figure out what I am doing wrong.
Thanks for any help in advance.
CBlair
Crystal, InstallShield, branching out in other programming realms.