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 / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Macros

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Liz - 03 Mar 2008 17:16 GMT
Hi I am trying to set up protection in a worksheet for certain columns only.  
On blank rows I would like to add information in those protected columns is
this possible to do with out entering a password. Would I have to create a
Macro for this set up if so how would I go about this.  Thanks for any help
you can give me.
LeShark - 03 Mar 2008 18:00 GMT
a few assumptions here...

the protected data is contiguous - i.e. the blank rows come at the end not
in between.. if this is the case then the following will help

insert a range like below. the example uses Sheet1 and the protected columns
will be H & I & J. This range expands as data is inserted into column H.

=OFFSET(Sheet1!$H$1,0,0,COUNTA(Sheet1!$H:$H),3)

unprotect all the cells on the sheet

give the sheet a password - in the example it is "mypassword"

insert the following code in a module - it runs each time the sheet is
opened and protects all the data in the range - in this case data in columns
H, I and J
the rows below the last entry in column H are unprotected.

sub Auto_Open ( )
ActiveSheet.unprotect Password:="mypassword"
Range("myrange").Select
Selection.Locked = True
ActiveSheet.protect Password:="mypassword"
end sub

have fun...

> Hi I am trying to set up protection in a worksheet for certain columns only.  
> On blank rows I would like to add information in those protected columns is
> this possible to do with out entering a password. Would I have to create a
> Macro for this set up if so how would I go about this.  Thanks for any help
> you can give me.
 
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.