Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default macro to protect sheet

Hi,

That's the default for sheet protection so use

Sub sonic()
'Your code
ActiveSheet.Protect Password:="mypass"
End Sub

"richzip" wrote:

I have macro code set up to copy data from a large worksheet into a template,
and then save the template with a new name.

I would like to protect the worksheet after copying the data onto it. I
want the options "select locked cells" and "select unlocked cells" to be the
only ones checked.

What macro code can I add to accomplish this?

Thank you

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
Protect Sheet Macro jrob54245 Excel Worksheet Functions 2 November 6th 08 09:25 PM
Macro with protect sheet Pyrite Excel Discussion (Misc queries) 1 October 10th 08 05:03 PM
Protect sheet in macro traima Excel Worksheet Functions 3 March 9th 07 06:05 PM
Using macro to un/protect sheet Bonbon Excel Worksheet Functions 2 February 23rd 06 08:14 PM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi[_5_] Excel Programming 1 May 2nd 04 03:50 PM


All times are GMT +1. The time now is 08:55 AM.

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"