Macro protection (Re posting 12/6/01)


Posted by Jim on December 13, 2001 5:14 AM

Firstly I must say this is a cracking site.
I feel I must respond to answers given to me concerning macro protection.
I strongly agree there is a time and place for macro protection and virus writers should be punished by law. However there are legitimate reasons for wanting to bypass macro protection - for example the usage I wanted to apply where I did not want copyrighted excel Business Planning models to be copied and re-modelled. I feel there is a case in these circumstances.
However, I respect your views and agree with most of them.
I have also been thinking a bit more laterally and the sheets I am sending are between trusted sources therefore I could hide and password protect all sheets except a cover sheet with a button to unhide all the sheets - this button would obviously only work if macros are enabled (with a note to say such as a message box).
This maintains the necessary macro protection facility (protecting us 99.9% of innocent PC users) but also protects my information from other people who break the law (i.e. those who ignore copyright).

PS I too hate virus writers as they have costed me a perfectly good PC and nearly a laptop...some of us do just want to create decent excel applications

Posted by Jim T on December 13, 2001 5:42 AM

a work around

Hi Jim,
This is what i do:

Private Sub Workbook_Open
ThisWorkbook.IsAddin = False
End Sub

If the user chooses to disable the macros all they
get is a blank screen.

HTH

Jim T

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.IsAddin = True
End Sub

Posted by Jim on December 13, 2001 9:41 AM

Re: a work around

Sorry Jim T - perhaps I'm being stupid here but I'm relatively new to all this. I can't seem to get your script to work. Can you help any further?

Jim

: Firstly I must say this is a cracking site. : I feel I must respond to answers given to me concerning macro protection. : I strongly agree there is a time and place for macro protection and virus writers should be punished by law. However there are legitimate reasons for wanting to bypass macro protection - for example the usage I wanted to apply where I did not want copyrighted excel Business Planning models to be copied and re-modelled. I feel there is a case in these circumstances. : However, I respect your views and agree with most of them. : I have also been thinking a bit more laterally and the sheets I am sending are between trusted sources therefore I could hide and password protect all sheets except a cover sheet with a button to unhide all the sheets - this button would obviously only work if macros are enabled (with a note to say such as a message box). : This maintains the necessary macro protection facility (protecting us 99.9% of innocent PC users) but also protects my information from other people who break the law (i.e. those who ignore copyright).



Posted by Bariloche on December 14, 2001 6:29 PM

Code placement

Jim,

Did you put JimT's sub routines in the "ThisWorkbook" code sheet. They're event subs, they won't work (as intended) if put in a code module sheet.


enjoy

Sorry Jim T - perhaps I'm being stupid here but I'm relatively new to all this. I can't seem to get your script to work. Can you help any further? : This is what i do: : ThisWorkbook.IsAddin = False : End Sub : get is a blank screen. : ThisWorkbook.IsAddin = True : End Sub :