ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening "locked" application (https://www.excelbanter.com/excel-programming/384685-opening-locked-application.html)

Bruce Maston[_2_]

Opening "locked" application
 
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.

Chip Pearson

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.




Vergel Adriano

Opening "locked" application
 
Go to Tools-Macro-Security and select Medium. Open your workbook and
select disable macros. You can then go to the VBA Editor and make necessary
changes to your code.

"Bruce Maston" wrote:

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.


Bruce Maston[_2_]

Opening "locked" application
 
Thank you both for your response. Yes, this absolutely solves the problem.

"Bruce Maston" wrote:

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.



All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com