I saw these here...is this all all I need to stop users from cutting/poasting/copying and also not to be able to stop macros from running or stop them and see them
PHP Code:
'' these here can be omitted - they prevent the ability to copy,paste,del,insert
'EnableControl 21, False ' cut
'EnableControl 22, False ' paste
'EnableControl 755, False ' pastespecial
'Application.OnKey "^c", "Error"
'Application.OnKey "^v", "Error"
'Application.OnKey "+{DEL}", "Error"
'Application.OnKey "+{INSERT}", "Error"
'Application.CellDragAndDrop = False
'Application.OnDoubleClick = "Error"
Was looking to run these when book opens and then to allow them when book closes or saves
Not able to stop macros from running? i.e. prevent Ctrl+Break?
That might be quite tricky and/or unwise - if you (not that you ever would) somehow made an infinite loop in your code... Well, you know.
If you just password protect the project: Tools -> VBAproject properties -> protection -> lock for viewing, you can prevent people from looking at your precious code without potentially ruining their entire Excel instance.
You may also want to think about the potential choices re: running these settting changes on workbook open events or workbook activate events and whether or not you're going to "disable" users from using other workbooks whilst using your tool. Don't make people hate you!
Generally, VBA projects are not great for particularly vigorous security. I know Jack and Roy have a pretty good secure lockdown tool but it's not free - google it.
HTH
Last edited by Cheeky Charlie; 09-07-2008 at 12:48 PM.
Reason: grammar - I'm alytirate
I would be interested in seeing the code. I do run a code (macro to select the user and it allows only those pages to be secure and I do password protect the pages.)
I really would be careful before changing a user's settings. If you fail to reset hem you will more than likely end up with some disgruntled users, maybe even the boss!
It should really be sufficient to password protect the sheets and/or workbook. Although not over strong this will deter most users.
You can google for excel dictator application.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
This is above and beyond locking a project in the normal way (which is fairly breakable, if that's what someone wants to do!)
HTH
PS, As I've already alluded to, Roy and I are on the same page re: fiddling with things and messing them up for users - you have to be pretty confident you know what you're doing if you're going to play these games...
Last edited by Cheeky Charlie; 09-07-2008 at 01:36 PM.
Bookmarks