View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Making cells readonly

you have to protect the sheet as well.

--
Regards,
Tom Ogilvy


Sarah wrote in message
...
I have a spreadsheet that I am working with in VBA. I have tried making

the sheet read only after populating it by using the following code:
For i = 1 to 3
sheet1.Columns(i).Locked = True
Next

However, I am still able to edit all cells. Is there some other syntax

that I should use? Can't figure out why this won't work.

Thanks much.