#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Protection

I've made about 70 workbooks all saved as the specific product they hold
information on. Each workbook has 4 sheets. Sheet 1 is where new data is
entered. Sheet 2 lists the new data entered each time we enter it and just
moves the older data down one row. Sheet 3 is our Certificate of Analysis
which is very important and muct not be altered. Sheet 4 is a graph of the
data entered for each parameter.

The First macro I use inserts a new row on sheet 2 so that the new data can
be added and all excisting data is shifted down.

Private Sub CommandButton1_Click()
Sheets("Sheet2").Select
Selection.Insert Shift:=xlDown
Sheets("Sheet1").Select
End Sub

The Second macro I use allows me to alter information on Sheet 1 and then
transfers that information to the correct location on sheets 2,3, and 4.
example:

''''''''''''''''''''Transfers Data From Sheet 1 To Sheet 2 And
3''''''''''''''''''''

'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''
Sheets("Sheet1").Select
Range("B1").Select
Selection.Copy
Sheets("Sheet2").Select ' Product Name
Range("E1").Select
ActiveSheet.Paste
Sheets("Sheet3").Select
Range("B10").Select
ActiveSheet.Paste


Is it possible to Protect EVERY cell except a few select ones on sheet 1
where data is entered so that once you enter and engage the macro you cannot
go to sheet 2,3, or 4 and change anything?

The problems I am having are when I protect every sheet except the select
cells on sheet1 and I engage the first macro it will not shift the rows down
on sheet2 because sheet 2 is protected. The other problem is since I am
transfering data from sheet1 to the other 3 sheets it wont transfer the data
to protected sheets.


sorry for rambling.

I just want to be the only person able to alter all the information of each
workbook.
I do however want other people to have the ability to open my workbook.
Enter new data into the allocated cells ( cells B5 - B8 and B11 - B17) and
engage the 2 macros transfering the data to sheets 2,3, and 4 while not
giving them the ability to change any of the other information on sheet 1 or
the other 3 sheets.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Protection


Good evening Ryanmhess

On Sheet 1 select all the cells that you want to be able to alter with
the protection turned on. Once they are all selected press ctrl + 1.
Go to protection, and uncheck the locked box. Now you can protect
Sheet 1 and still be able to enter to a select range of cells.
However, short of hiding the other sheets through your macro you cannot
stop the other users from accessing them.

You could also protect Sheet 2, and unprotect it from your macro, run
the routine and reprotect it before returning the control to the user.
The code would look something like this if protected with a password of
"mypass":

ActiveSheet.Unprotect Password:="mypass"

ActiveSheet.Protect Password:="mypass"

A note of caution : This protection is not particularly difficult to
crack. It's OK to stop accidental erasure of info or to keep out
casual users, but anyone beyond that can remove the password within 30
seconds.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=401223

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
Excel Data Protection Best Practice: AKA: Real Sheet Protection Mushman(Woof!)[_2_] Excel Discussion (Misc queries) 4 December 30th 09 01:20 AM
Excel Data Protection- AKA: Sheet/Macro Password Protection Mushman(Woof!) Setting up and Configuration of Excel 0 December 29th 09 06:50 AM
WS Protection: Different Levels of Protection on Different Ranges Carmi Excel Discussion (Misc queries) 4 August 31st 07 02:26 PM
Cell Protection vs. Worksheet Protection kmwhitt Excel Discussion (Misc queries) 4 September 24th 06 02:37 AM
Worksheet protection is gone and only wokbook protection can be se Eric C. Excel Discussion (Misc queries) 4 May 2nd 06 04:50 PM


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