![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 11
|
Hi, All
I was trying to quit excel application using Quit method, after working with and closing all its workbooks. The code is simple as following: excelApp.Quit Set excelApp = Nothing I got unhandled exception (access violation) says: "memory xxx refers memory xxx, can't read". So the application has to be closed manually. What is the problem? Thanks for all the input. / dan |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
Dan,
I am not sure if this is what you want by just try using the following code to quit excel: Excel.Application.Quit I hope this helps. Kind regards, Al |
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Posts: 11
|
Al,
Thanks for the reply. I tried what you said, and still get the same unhandled exception. I can do all sorts of thing, like adding workbook to the application, getting memory used by the application, except quit the application. Is there other way to close the application? Thanks /dan |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
Try just using Application.Quit
It works for me. Where are you placing the code? |
|
|
|
|
|
#5 |
|
Guest
Posts: n/a
|
i tried the Excel.Application.Quit to quit excel and it does work so i suggest that the other person retries it.
|
|
|
|
#6 |
|
New Member
Join Date: Mar 2002
Posts: 11
|
I am using RoseScript, which is Basic Script language similar to VB.
I can't directly use Application.Quit. It has to be called as: myExcelApp.Application.Quit or myExcelApp.Quit dan |
|
|
|
|
|
#7 |
|
New Member
Join Date: Mar 2002
Posts: 11
|
One more thing is that myExcelApp.Quit works fine with my other scripts, but only this one I got memory access violation.
so I don't think there is the problem of syntax. It seems the program can't locate the application when trying to close it. But I can't figure out the reason, as I still can do things like adding workbook on this applicaition. Thanks /dan |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|