hey, i wonder if anybody can help me. I want to make a quiz for my mates on excel but i want it so that once u've typed the answer into the cell it lockes the cell or summit so that you cnt edit it this is so that if they get the wrong answer they cnt change it. also i need to know a code to type in so that when the right answer is clicked the cell under says correct. and any other suggestion on what to do or how to make a quiz wud be helpful.
thanks rossy.
p.s i got excel 2007
To make a cell only accessible one time would require the use of VBA code. To create usable code would probably require you to design your whole quiz...layout, questions, answers, etc...and what the final look should be.
Someone can help add code to that to lock cells as answers are entered.
Last edited by JBeaucaire; 01-25-2009 at 05:56 PM.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
You could try a macro like this pasted into the appropriate sheet tab in the VBA editor (shift F5).
You will need to have all the cells unlocked and the sheet protected first.Code:Private Sub Worksheet_Change(ByVal Target As Range) ActiveSheet.Unprotect Password:="MyPassword" Target.Locked = True ActiveSheet.Protect Password:="MyPassword" End Sub
You will need to hide the code by protecting the VBA project - Tools - VBAProject properties - Protection to avoid the password being visible.
Martin
Eighty Twenty Spreadsheet Automation http://homepage.ntlworld.com/martin.rice1/ for all your Excel customisation and consulting needs.
If my solution has saved you time and/or money, please consider donating to Cancer Research UK.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks