View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Al[_17_] Al[_17_] is offline
external usenet poster
 
Posts: 5
Default Close Excel if macro stopped

I have a protected worksheet with many protected hidden sheets and
cells. However, if the user is on an older version of Excel (i.e.
2000) and hits a button or esc while the macro is running, they can then
hit the stop button, unhide the hidden sheets and move around and see
the data, which I don't want to be accessible.

If the user is on Excel 2002, which is what I used, this is not an issue
- even if sheets are unhidden, they cannot see any cells because they
are white on white and sheet is protected. This must be some bug w/
older versions of MS. Very weird.

Anyhow, if someone runs the macro and stops it, I want Excel to close
down so there is no chance of accessibility to the data. Is there a VB
command that I can add in the macro that will accomplish this?

Thanks,
Al


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!