Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default 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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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.

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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
"WinForm Application" to act as "RTD Server" using .Net mduraidi Excel Discussion (Misc queries) 0 March 30th 06 01:01 PM
"WinForm Application" to act as "RTD Server" using .Net mduraidi Excel Programming 0 March 30th 06 12:55 PM
Opening An Excel Application and "Analysis ToolPac" does not load Mark Excel Programming 4 March 6th 05 01:41 PM


All times are GMT +1. The time now is 10:11 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"