View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Disable Button when no workbooks are open.

Since the OP asked about a control on a toolbar created in an add-in he
was developing, I think the likelihood of a second add-in
enabling/disablin that control is not worth considering.


In article ,
"Aaron Queenan" wrote:

Even if the BeforeClose event came after the dialogue box, there would still
be another bug waiting to rear it's head. Consider the following scenario:

- A user has two add-ins installed on the computer, both which monitor the
BeforeClose event in the same way.
- One add-in sometimes sets the Cancel flag. The other add-in uses your
code.
- If the BeforeClose event is called in the other add-in first, there is no
problem.
- If the BeforeClose event is called in your add-in first, if the other
add-in sets the Cancel flag you will have already disabled the icon.