View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Grandma Barb Grandma Barb is offline
external usenet poster
 
Posts: 2
Default How do I access each cell in a range

Thanks. I replaced the 11 with "" (quotes), copied the for next loop into my
macro and it worked. Now I don't have to worry about little fingers messing
up my excel sheet which lets the children in my Sunday School class work on
their Bible knowledge. Grandma Barb


"Don Guillett" wrote:

try this

Sub chgunlocked()
For Each c In Selection
If c.Locked = False Then c.Value = 11
Next
End Sub


--
Don Guillett
SalesAid Software

"Grandma Barb" <Grandma
wrote in message
...
I have a workbook set up to use in a classroom setting with multiple

choice
answers. I have unlocked the answer boxes and protected the sheet. All
works nicely. Now I would like to have each student remove their answers
leaving the workbook for the next student. Before the protection I used a
macro selecting a range of cells in the answer columns and clearing the
cells. How can I move down the range and clear only the unlocked cells?




 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.