#1   Report Post  
Posted to microsoft.public.excel.programming
Liz Liz is offline
external usenet poster
 
Posts: 133
Default Macros

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Macros

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...



"Liz" wrote:

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.

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
Macros in Personal.xls that would create two toolbars and buttonswith assigned macros Brian Day Excel Programming 1 March 29th 07 11:20 PM
choose default macros Not Enabled / Macros Enable Setting BEEJAY Excel Programming 2 June 30th 06 01:07 PM
weird saving of a document with macros resulting with macros being transfered to the copy alfonso gonzales Excel Programming 0 December 12th 04 09:19 PM
convert lotus 123w macros to excel macros rpiescik[_2_] Excel Programming 1 September 19th 04 12:41 PM
convert lotus 123w macros to excel macros rpiescik Excel Programming 1 September 18th 04 01:35 PM


All times are GMT +1. The time now is 01:44 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"