Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / November 2006

Tip: Looking for answers? Try searching our database.

protected sheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shlomit - 21 Nov 2006 13:03 GMT
I protected sheet in macro with the following code but not all the column was
protected?

Worksheets("GiveGetDB").Protect Contents:=True

Any one can help?

Thanks,
shlomit
Dave Peterson - 21 Nov 2006 13:37 GMT
If some of the cells in those columns are unlocked (format|Protection tab), then
those cells can still be changed.

> I protected sheet in macro with the following code but not all the column was
> protected?
[quoted text clipped - 5 lines]
> Thanks,
> shlomit

Signature

Dave Peterson

Nick Hodge - 21 Nov 2006 13:38 GMT
Shlomit

Are the cells unlocked?  Protection will only work if the cells are also
locked

Signature

HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
nick_hodgeTAKETHISOUT@zen.co.ukANDTHIS
www.nickhodge.co.uk

>I protected sheet in macro with the following code but not all the column
>was
[quoted text clipped - 6 lines]
> Thanks,
> shlomit
Shlomit - 22 Nov 2006 20:56 GMT
So how can I lock all the cells and protected the sheet in the macro?

Thanks,
Shlomit

> Shlomit
>
[quoted text clipped - 11 lines]
> > Thanks,
> > shlomit
Gord Dibben - 22 Nov 2006 21:17 GMT
To lock all the cells and protect the sheet........

Sub SHEETPROTECT()
With ActiveSheet
   .Cells.Locked = True
   .Protect Password:="justme", DrawingObjects:=True, _
           Contents:=True, Scenarios:=True
           End With
End Sub

Gord Dibben  MS Excel MVP

on Wed, 22 Nov 2006 12:56:01 -0800, Shlomit <Shlomit@discussions.microsoft.com>
wrote:

>So how can I lock all the cells and protected the sheet in the macro?
>
[quoted text clipped - 16 lines]
>> > Thanks,
>> > shlomit

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.