View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Simon Letten Simon Letten is offline
external usenet poster
 
Posts: 20
Default Selecting only unlocked cells to clear

RAP

You need to test the Locked property of the cells, e.g.

For Each cell in Range
If cell.Locked = False Then
cell.ClearContents
End If
Next cell
--
HTH

Simon


"RAP" wrote:

Hello,
Can anyone give me the VB code to select all the unlocked-only cells on a
page or in a defined range, to clear them?

Thanks,
Randy