View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Opening "locked" application

Open the VBA Editor, press CTRL+G to view the Immediate Window and enter the
following followed by the ENTER key:

Application.EnableEvents = False

Now open your workbook. Then go back to VBA and enter the same command in
the Immediate, but change False to True.

Or you can hold down the SHIFT key when opening the workbook.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)



"Bruce Maston" wrote in message
...
Well, I've really done it to myself! I have an app. that I coded so that
it
looks for some basic information (information in a database table) in the
workbook.open event. If you hit an error, it causes the program to
application.quit. This was included to prevent a user from entering data
if
the database is corrupted, not available, etc.

Problem: I now want to change tihe address in the code where the app.
looks
for the information. But I can't open the app. because the informationn
has
been moved. So the app. automatiically closes. I'm locked out! [My bad.]

Anyway, is there a way to interrupt the application as it load by some
sort
of key stroke (or some such) so that I can break into the code and make
the
necessary changes?

Thank you for any input.