tonyBruckner
New Member
- Joined
- Apr 18, 2002
- Messages
- 21
I'm writing a program for schoolkids and don't want them to alter any cells that are part of the assignment or to access VBA. The assignment involves clicking buttons that invoke macros. The macros change text in locked cells by deprotecting then reprotecting...
ActiveSheet.Unprotect
ActiveCell.FormulaR1C1 = "hello"
ActiveSheet.Protect
This is the wrong approach because of its drawbacks....
1) if a student tries to change a locked cell, a message box appears that tells him how to deprotect it.
2) a password option would be clumsy in a computer lab with 30 kids.
3) if the macro doesn't deprotect first, then a message box is invoked that gives students access to VBA (which they otherwise don't know exists) via the debug button.
Is there a way for a macro to slip a cell text change under the veil of protection without these message boxes?
And/or can the message box that explains how to deprotect the sheet be taken out or reworded?
Thanks in advance
ActiveSheet.Unprotect
ActiveCell.FormulaR1C1 = "hello"
ActiveSheet.Protect
This is the wrong approach because of its drawbacks....
1) if a student tries to change a locked cell, a message box appears that tells him how to deprotect it.
2) a password option would be clumsy in a computer lab with 30 kids.
3) if the macro doesn't deprotect first, then a message box is invoked that gives students access to VBA (which they otherwise don't know exists) via the debug button.
Is there a way for a macro to slip a cell text change under the veil of protection without these message boxes?
And/or can the message box that explains how to deprotect the sheet be taken out or reworded?
Thanks in advance