[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

"Cannot quit Excel" after tried to access protected WB

tskogstrom

12/12/2006 9:42:00 AM

Hi,

I have a protected WB and WS with VBA code. If I open it and go to
"View code", I need to enter the password. Right.

If I Cancel, I get "System error &H80004005 (-2147467259)" and
"Undefiend error" message.

If I close VBA editor, and try to close Excel, it tell "Cannot quit
Excel". The only thing I can do is to end the excel process.

There are nothing in call stack. What can I do to be able to end excel
normally? Is there any open processes I can't see but that can be ended
with VBA on Workbook_Close event maybe?

Happy to any suggestions,
Tskogstrom

2 Answers

tskogstrom

12/13/2006 1:39:00 AM

0

Hi,

Isn't Quit just VBA but the same I do now manually? Or will Quit handle
open processes/locked memory/"somethings" in another way?

/Regards
tskogstrom



Madhan skrev:

> Hi, if you have access to the code, then try giving Application.Quit in the
> code.
>
> "tskogstrom" wrote:
>
> > Hi,
> >
> > I have a protected WB and WS with VBA code. If I open it and go to
> > "View code", I need to enter the password. Right.
> >
> > If I Cancel, I get "System error &H80004005 (-2147467259)" and
> > "Undefiend error" message.
> >
> > If I close VBA editor, and try to close Excel, it tell "Cannot quit
> > Excel". The only thing I can do is to end the excel process.
> >
> > There are nothing in call stack. What can I do to be able to end excel
> > normally? Is there any open processes I can't see but that can be ended
> > with VBA on Workbook_Close event maybe?
> >
> > Happy to any suggestions,
> > Tskogstrom
> >
> >

NickHK

12/13/2006 3:38:00 AM

0

With all WSs and WB protected and VBA code password protected, I cannot get
this to happen.
Either the WB may be corrupt or your code is running/in break mode at that
time.

NickHK

"tskogstrom" <tskogstrom@beslutspaverkan.se> wrote in message
news:1165916522.269339.152560@79g2000cws.googlegroups.com...
> Hi,
>
> I have a protected WB and WS with VBA code. If I open it and go to
> "View code", I need to enter the password. Right.
>
> If I Cancel, I get "System error &H80004005 (-2147467259)" and
> "Undefiend error" message.
>
> If I close VBA editor, and try to close Excel, it tell "Cannot quit
> Excel". The only thing I can do is to end the excel process.
>
> There are nothing in call stack. What can I do to be able to end excel
> normally? Is there any open processes I can't see but that can be ended
> with VBA on Workbook_Close event maybe?
>
> Happy to any suggestions,
> Tskogstrom
>