Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
François
 
Posts: n/a
Default code execution has been interrupted

Hello,

Is there a way to avoid the user to stop the process of a macro.
The reason for this is very simple : in the macro the sheet is deprotected
at the beginning and reprotect at the end. Therefore to avoid the user to
find a unprotected sheet whenever he stops the macros, I would like to set
the unbreakable switch to on.

Many thanks for your valuable help.

François
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Take a look at:

application.EnableCancelKey

in VBA's help.

Read the warning in there about a "runaway" loop.

François wrote:

Hello,

Is there a way to avoid the user to stop the process of a macro.
The reason for this is very simple : in the macro the sheet is deprotected
at the beginning and reprotect at the end. Therefore to avoid the user to
find a unprotected sheet whenever he stops the macros, I would like to set
the unbreakable switch to on.

Many thanks for your valuable help.

François


--

Dave Peterson
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
how do i create an access code sheet to number my office files an. dana New Users to Excel 1 February 12th 05 03:49 AM
Help with Amending this Code Please [email protected] Excel Worksheet Functions 4 February 1st 05 07:04 PM
Command Button VBA code Dave Peterson Excel Discussion (Misc queries) 2 January 25th 05 11:28 PM
Often-Used Code not working in a new Workbook Steve Excel Discussion (Misc queries) 2 December 16th 04 11:55 PM
Zip Code Macro Ken Wright Excel Worksheet Functions 0 December 9th 04 07:55 AM


All times are GMT +1. The time now is 07:21 AM.

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"