Hi, b(ut)ob(ut)hc!
I've been out for the weekend, just arriving back. Let's read above a little... I see Luke M aided you with part of your issues and I agree with you about shift key usage...
But... (remember that there's always a but...)
... there's a workaround. Not too tricky, not too easy, and as bulletproof as any password schema is within Excel (keep in mind password recovering, password cracking, Elcomsoft, and all that stuff).
Of course this involves getting hands a little dirty with VBA, but nothing from outerspace. The general idea is:
a) protect workbook structure so as to don't let users hide/unhide worksheets
b) protect worksheets calculated cells so as to don't let users screw your design
c) protect VBA project so as to don't let users sniff around
...(nothing strange up to this moment)
d) add a dummy/splash worksheet to "welcome" shifted users
e) add an auto open macro Sub procedure
f) add a before save macro Sub procedure
g) recommended but not necessary a save command button
Auto open procedure.
Here you'll place the code for:
- unprotect workbook
- unhide other worksheets (normal use)
- hide splash worksheet (only worksheet not hidden at save time)
- protect workbook
If the so-self-thought-clever-shifted user tries to cheat you using shift key trick, he'll be bypassing this auto open procedure too, and he'll be only looking at the splash sheet, and as he won't have the password for changing workbook structure he won't be able to neither unhide nor use your data (nor save nor nothing).
If he never attempts to open the workbook using shift trick, he won't ever know your protection measures scheme.
Before save procedure.
Here you'll place the code for:
- check against unproper open methods, if so, cancel save
- unprotect workbook
- unhide splash worksheet (you can't hide all worksheets)
- hide other worksheets
- protect workbook
The passwords could be all the same or as my recommendation:
- VBA project, just stored in your head
- worksheet cells, different from previous one
- workbook structure, same as above
The last two should be embedded (defined, stored) within your VBA code as auto open and before save procedures use them. It'll all depend on the passwords you choose, if they're algorithm based, or word or phrase based, ... but always remember that they can be sniffed with a file/hexadecimal editor.
So:
- define them as variables instead of constants
- set a piece of code that assign them values from a procedure
- don't use string constants ("AB"), use char functions (chr$(65)&chr$(66))
- always of course, strong passwords or passphrases of more than 12 or better 16 chars
With all these, if a user breaks into your workbook bypassing your efforts, he well deserves his achievement
I know you understood everything but don't know how to implement that... for the moment. Now it's 01:00 AM, tomorrow (today, bah) afternoon I'll send you a sample empty workbook as starting kick off, if you wish. Please let me know about this.
Regards!