EnableSelection for all sheets

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Can I amend the code below so that it applies to all worksheets without the
need to list each sheet name?

Sub Workbook_Open()
Sheets("Sheet1").EnableSelection = xlUnlockedCells
End Sub
 
Try

Dim WS As Worksheet
For Each WS In ThisWorkbook.Worksheets
WS.EnableSelection = xlUnlockedCells
Next WS


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)
 
Back
Top