Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default 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!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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!



Reply
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
EnableSelection Protecting sheet question Damian Excel Discussion (Misc queries) 3 September 25th 09 08:07 PM
what is enableselection proprty does? Dev Excel Programming 3 October 23rd 06 08:37 PM
EnableSelection = xlUnlockedCells Stuart[_5_] Excel Programming 1 January 28th 05 12:39 AM
Why does the EnableSelection-xlNoSelection stick thru the user interface? IanS[_2_] Excel Programming 3 June 8th 04 02:05 AM
.EnableSelection = xlUnlockedCells Stuart[_5_] Excel Programming 3 May 11th 04 03:55 PM


All times are GMT +1. The time now is 11:25 PM.

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

About Us

"It's about Microsoft Excel"