![]() |
EnableSelection for all sheets
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 -- This post was created using recycled electrons! |
EnableSelection for all sheets
Use a looping macro
-- Don Guillett SalesAid Software "Newbeetle" wrote in message ... 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 -- This post was created using recycled electrons! |
EnableSelection for all sheets
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) "Newbeetle" wrote in message ... 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 -- This post was created using recycled electrons! |
All times are GMT +1. The time now is 08:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com