View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
AA2e72E[_2_] AA2e72E[_2_] is offline
external usenet poster
 
Posts: 93
Default How to disable Visual Basic Editor in Excel file

Insert this line

application.EnableCancelKey =xlDisabled

at the start of your code or in the workbook_open event handler

OR

Protect your code with a password.