I've solved it in another way. Silly of me not discover that solution earlier. I just did the sort in Access, before exporting it to Excel as pivot table. So now everything is just perfect.
It's seems like using the Xl object creates another instance of Excel, so when you close it you're not...
I've think i've solved my problem now. It's seems like a matter of using the right command for doing the right thing or else it creates another instance of the object, so at the end when you close it you're not able to close the second instance.
One thing i haven't solved it to sort the...
I have the same problem. I think one solution could be to find the windows handle with the following API and then close that handle.
Right after you create the Excel object you do this:
hWndXl = FindWindow("XLMAIN", AppExcel.Caption)
Then you get the handle and it just matter of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.