View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Close Workbook If user disables macro's

As Tom says, you cannot do what you want, but you can make it obvious to
the user that they shouldn't.

One way to approach this is as follows.
- create a worksheet with a message on explaining that for this workbook to
run it needs macros enabled, maybe even a few screenshots
- hide all other worksheets]
- add some code in the Workbook_Open event that un hides the other sheets,
but hides that sheet.


What happens is that if they do not enable macros, they will only see the
warning sheet, telling them how to do it. If the enable macros, it will
startup as the workbook it should be.


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"mmc308" wrote in message
...
I am currently looking for a way to close a workbook if the user has a

lower
security setting than meduim or the user chooses to disable macro's

The reason for this I have a macro in the work book that checks for a data
and lock the worksheet if the date has passed, however if they disable the
macro's they can work on this worksheet

Any idea would be appreciated
TIA
Michael