View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Prevent VBE from opening on errors?

If you protect the project (not the worksheet, workbook or file), then when the
code blows up, the user won't see the code.

But be aware that protection of the project isn't foolproof. It can be broken
by some free tools on the internet, along with password cracking programs (that
are not free).

Ed from AZ wrote:

Thanks, Jim. Until I can kill all my bugs, I'll use the protection.
I've got the sheet protected, and I'm not used to using it like that
so I've missed a spot or two where I need to unprotect. But if the
VBE opens up, there's the Unprotect with the password in plain sight.

Ed

On Apr 4, 10:27 am, "Jim Rech" wrote:
Your first line of defense is addressing your bugs, and it will have other
benefits like your code will run to completion successfully.<g

But in the meantime, if you don't want users to see your code when it
errors (or any other time), protect the project via Tools, VB Project
Properties, Protection.

--
Jim
"Ed from AZ" wrote in ...



In XL 2003, when my code errors (more than I want it to!!), the VBE
opens with the offending line of code highlighted in yellow. How can
I prevent this from happening so the user doesn't see the code?


Ed- Hide quoted text -


- Show quoted text -


--

Dave Peterson