Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default Application.quit

I recently added to the Workbook_Before_Close procedure the following code ---

----------
----------
ThisWorkbook.Save
Application.Quit



Now, when I open Excel, I get an error msg: PERSONAL.XLS is locked for
editing...........with the options to
1 Open as Read Only
2 Notify Me
3 Cancel

If I Open the file (or any Excel file) I get another Error Msg ----"The
instruction at 0x3005c5eb" referenced memory at "0x00000018". The memory
could not be written."
The OK button then closes Excel and the Cancel button opens Visual Basic
with code in C++

----------------------------
How do I regain access to the Excel application and why does the code I used
cause this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Application.quit

Close all applications and
Try deleting all the files in your temp folder.

Then reboot.

--
Regards,
Tom Ogilvy



"cush" wrote:

I recently added to the Workbook_Before_Close procedure the following code ---

----------
----------
ThisWorkbook.Save
Application.Quit



Now, when I open Excel, I get an error msg: PERSONAL.XLS is locked for
editing...........with the options to
1 Open as Read Only
2 Notify Me
3 Cancel

If I Open the file (or any Excel file) I get another Error Msg ----"The
instruction at 0x3005c5eb" referenced memory at "0x00000018". The memory
could not be written."
The OK button then closes Excel and the Cancel button opens Visual Basic
with code in C++

----------------------------
How do I regain access to the Excel application and why does the code I used
cause this?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Application.quit

Open the Windows Task Manager (press CTRL+SHIFT+ESC). Go to the Processes
tab and find EXCEL.EXE. Select the EXCEL.EXE process then click on the "End
Process" button. Terminate all EXCEL.EXE processes that you see.

If that does not work or if you don't see an EXCEL process in the task
manager, try to reboot your computer.


--
Hope that helps.

Vergel Adriano


"cush" wrote:

I recently added to the Workbook_Before_Close procedure the following code ---

----------
----------
ThisWorkbook.Save
Application.Quit



Now, when I open Excel, I get an error msg: PERSONAL.XLS is locked for
editing...........with the options to
1 Open as Read Only
2 Notify Me
3 Cancel

If I Open the file (or any Excel file) I get another Error Msg ----"The
instruction at 0x3005c5eb" referenced memory at "0x00000018". The memory
could not be written."
The OK button then closes Excel and the Cancel button opens Visual Basic
with code in C++

----------------------------
How do I regain access to the Excel application and why does the code I used
cause this?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default Application.quit

Tom,

I'm confused about the location of this temp folder.
I have a Temp folder located at

Docs and Settings\Admin\Local Settings\Temp
with approx 75 folders therein ... among them
is a folder labeled Excel8.0
I'm hesitant in deleting this entire Temp folder as I am over my
head here and I don't want to lose something that is vital.

Can you be specific regarding the location of the temp
folder you are referencing.
thanks

"Tom Ogilvy" wrote:

Close all applications and
Try deleting all the files in your temp folder.

Then reboot.

--
Regards,
Tom Ogilvy



"cush" wrote:

I recently added to the Workbook_Before_Close procedure the following code ---

----------
----------
ThisWorkbook.Save
Application.Quit



Now, when I open Excel, I get an error msg: PERSONAL.XLS is locked for
editing...........with the options to
1 Open as Read Only
2 Notify Me
3 Cancel

If I Open the file (or any Excel file) I get another Error Msg ----"The
instruction at 0x3005c5eb" referenced memory at "0x00000018". The memory
could not be written."
The OK button then closes Excel and the Cancel button opens Visual Basic
with code in C++

----------------------------
How do I regain access to the Excel application and why does the code I used
cause this?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Application.quit

That would be the one. I don't think you need to delete the sub
directories, only the files in the temp folder itself. That said, it has
always been my impression that if it is in the temp folder and not in use, it
can be deleted, including subdirectories.

If you try to delete everything at once, you may get a message that a
specific file can not be deleted - you will need to work around these.

--
Regards,
Tom Ogilvy

"cush" wrote:

Tom,

I'm confused about the location of this temp folder.
I have a Temp folder located at

Docs and Settings\Admin\Local Settings\Temp
with approx 75 folders therein ... among them
is a folder labeled Excel8.0
I'm hesitant in deleting this entire Temp folder as I am over my
head here and I don't want to lose something that is vital.

Can you be specific regarding the location of the temp
folder you are referencing.
thanks

"Tom Ogilvy" wrote:

Close all applications and
Try deleting all the files in your temp folder.

Then reboot.

--
Regards,
Tom Ogilvy



"cush" wrote:

I recently added to the Workbook_Before_Close procedure the following code ---

----------
----------
ThisWorkbook.Save
Application.Quit



Now, when I open Excel, I get an error msg: PERSONAL.XLS is locked for
editing...........with the options to
1 Open as Read Only
2 Notify Me
3 Cancel

If I Open the file (or any Excel file) I get another Error Msg ----"The
instruction at 0x3005c5eb" referenced memory at "0x00000018". The memory
could not be written."
The OK button then closes Excel and the Cancel button opens Visual Basic
with code in C++

----------------------------
How do I regain access to the Excel application and why does the code I used
cause this?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Application.quit

If you don't feel comfortable with deleting files in the Temp folder, maybe
just move them to a different folder. If for whatever reason, you need to
get the files back in the Temp folder, you can just move them back over.


--
Hope that helps.

Vergel Adriano


"cush" wrote:

Tom,

I'm confused about the location of this temp folder.
I have a Temp folder located at

Docs and Settings\Admin\Local Settings\Temp
with approx 75 folders therein ... among them
is a folder labeled Excel8.0
I'm hesitant in deleting this entire Temp folder as I am over my
head here and I don't want to lose something that is vital.

Can you be specific regarding the location of the temp
folder you are referencing.
thanks

"Tom Ogilvy" wrote:

Close all applications and
Try deleting all the files in your temp folder.

Then reboot.

--
Regards,
Tom Ogilvy



"cush" wrote:

I recently added to the Workbook_Before_Close procedure the following code ---

----------
----------
ThisWorkbook.Save
Application.Quit



Now, when I open Excel, I get an error msg: PERSONAL.XLS is locked for
editing...........with the options to
1 Open as Read Only
2 Notify Me
3 Cancel

If I Open the file (or any Excel file) I get another Error Msg ----"The
instruction at 0x3005c5eb" referenced memory at "0x00000018". The memory
could not be written."
The OK button then closes Excel and the Cancel button opens Visual Basic
with code in C++

----------------------------
How do I regain access to the Excel application and why does the code I used
cause this?

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Application.quit

I have used the same event without the Application.quit with my efforts.
Works fine for my use. closes and exits same as quiting.

"cush" wrote:

I recently added to the Workbook_Before_Close procedure the following code ---

----------
----------
ThisWorkbook.Save
Application.Quit



Now, when I open Excel, I get an error msg: PERSONAL.XLS is locked for
editing...........with the options to
1 Open as Read Only
2 Notify Me
3 Cancel

If I Open the file (or any Excel file) I get another Error Msg ----"The
instruction at 0x3005c5eb" referenced memory at "0x00000018". The memory
could not be written."
The OK button then closes Excel and the Cancel button opens Visual Basic
with code in C++

----------------------------
How do I regain access to the Excel application and why does the code I used
cause this?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.quit OlieH Excel Programming 3 March 15th 07 12:26 PM
Application.Quit elcroco Excel Programming 8 December 13th 06 04:12 PM
difference application.quit & application.close Pierre via OfficeKB.com[_2_] Excel Programming 4 November 8th 05 07:55 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
application.quit will not shut off application john Excel Programming 0 January 9th 04 11:29 PM


All times are GMT +1. The time now is 12:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"