LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.misc
Jonas Lindh
 
Posts: n/a
Default need help please....


Try this.

It will work provided that there are at least two unprotected cells on
more than one line in each sheet.

You can sustitute "ActiveWorkbook.Sheets.Count" with 32 if your
described sheets are placed first or are the only existing sheets in
the workbook .

Sub ClearAllUnlockedCellsOnAllSheets()
For N = 1 To ActiveWorkbook.Sheets.Count
R = 0
ActiveWorkbook.Sheets(N).Activate
ActiveWorkbook.Sheets(N).Range("A1").Activate
Do
If ActiveCell.Locked = False Then
ActiveCell.ClearContents
End If
R = ActiveCell.Row
ActiveCell.Next.Activate
Loop Until ActiveCell.Row < R
Next N
End Sub

Best regards Jonas Lindh


--
Jonas Lindh
------------------------------------------------------------------------
Jonas Lindh's Profile: http://www.excelforum.com/member.php...o&userid=31346
View this thread: http://www.excelforum.com/showthread...hreadid=526317

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"