ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Protecting Cetain Cells in Excel (https://www.excelbanter.com/excel-worksheet-functions/111833-protecting-cetain-cells-excel.html)

CharlieS

Protecting Cetain Cells in Excel
 
I have a spreadsheet that we will be sending out to many users. It will have
several columns protected and one unprotected so that the users can enter a
Yes or no to that column. I want to know if I can have that cell protected
once the entry is made or do I need to go back and lock that cell
individually? I have 44,000 rows we will be working with and it could get
very tedious to have to relock each one at the end of the day... HELP!

Paul B

Protecting Cetain Cells in Excel
 
CharlieS, you can with a macro,

Private Sub Worksheet_Change(ByVal Target As Range)
'Automatically Protecting After Input
'unlock all cells in the range first
Dim MyRange As Range
Const Password = "123" '**Change password here**
Set MyRange = Intersect(Range("A:A"), Target) '**change range here**

If Not MyRange Is Nothing Then
Unprotect Password:=Password
MyRange.Locked = True
Protect Password:=Password
End If

End Sub



To put in this macro right click on the worksheet tab and view code, in the
window that opens paste this code, press Alt and Q to close this window and
go back to your workbook. If you are using excel 2000 or newer you may have
to change the macro security settings to get the macro to run. To change the
security settings go to tools, macro, security, security level and set it to
medium
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003





"CharlieS" wrote in message
...
I have a spreadsheet that we will be sending out to many users. It will
have
several columns protected and one unprotected so that the users can enter
a
Yes or no to that column. I want to know if I can have that cell
protected
once the entry is made or do I need to go back and lock that cell
individually? I have 44,000 rows we will be working with and it could get
very tedious to have to relock each one at the end of the day... HELP!




CharlieS

Protecting Cetain Cells in Excel
 
Thanks! That's a huge help! I was really worried about having to go through
all 44 thousand entries each night so you just saved me a huge amount of work
and headache!

"Paul B" wrote:

CharlieS, you can with a macro,

Private Sub Worksheet_Change(ByVal Target As Range)
'Automatically Protecting After Input
'unlock all cells in the range first
Dim MyRange As Range
Const Password = "123" '**Change password here**
Set MyRange = Intersect(Range("A:A"), Target) '**change range here**

If Not MyRange Is Nothing Then
Unprotect Password:=Password
MyRange.Locked = True
Protect Password:=Password
End If

End Sub



To put in this macro right click on the worksheet tab and view code, in the
window that opens paste this code, press Alt and Q to close this window and
go back to your workbook. If you are using excel 2000 or newer you may have
to change the macro security settings to get the macro to run. To change the
security settings go to tools, macro, security, security level and set it to
medium
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003





"CharlieS" wrote in message
...
I have a spreadsheet that we will be sending out to many users. It will
have
several columns protected and one unprotected so that the users can enter
a
Yes or no to that column. I want to know if I can have that cell
protected
once the entry is made or do I need to go back and lock that cell
individually? I have 44,000 rows we will be working with and it could get
very tedious to have to relock each one at the end of the day... HELP!





Paul B

Protecting Cetain Cells in Excel
 
Your welcome
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"CharlieS" wrote in message
...
Thanks! That's a huge help! I was really worried about having to go
through
all 44 thousand entries each night so you just saved me a huge amount of
work
and headache!

"Paul B" wrote:

CharlieS, you can with a macro,

Private Sub Worksheet_Change(ByVal Target As Range)
'Automatically Protecting After Input
'unlock all cells in the range first
Dim MyRange As Range
Const Password = "123" '**Change password here**
Set MyRange = Intersect(Range("A:A"), Target) '**change range
here**

If Not MyRange Is Nothing Then
Unprotect Password:=Password
MyRange.Locked = True
Protect Password:=Password
End If

End Sub



To put in this macro right click on the worksheet tab and view code, in
the
window that opens paste this code, press Alt and Q to close this window
and
go back to your workbook. If you are using excel 2000 or newer you may
have
to change the macro security settings to get the macro to run. To change
the
security settings go to tools, macro, security, security level and set it
to
medium
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003





"CharlieS" wrote in message
...
I have a spreadsheet that we will be sending out to many users. It will
have
several columns protected and one unprotected so that the users can
enter
a
Yes or no to that column. I want to know if I can have that cell
protected
once the entry is made or do I need to go back and lock that cell
individually? I have 44,000 rows we will be working with and it could
get
very tedious to have to relock each one at the end of the day... HELP!







CharlieS

Protecting Cetain Cells in Excel
 
Next question - do you know if I can protect the spreadsheet from being
printed? Also can I protect it from being copied? I am not sure what they
are up to, but these are the tasks I am being asked to accomplish... Thanks.

"Paul B" wrote:

Your welcome
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"CharlieS" wrote in message
...
Thanks! That's a huge help! I was really worried about having to go
through
all 44 thousand entries each night so you just saved me a huge amount of
work
and headache!

"Paul B" wrote:

CharlieS, you can with a macro,

Private Sub Worksheet_Change(ByVal Target As Range)
'Automatically Protecting After Input
'unlock all cells in the range first
Dim MyRange As Range
Const Password = "123" '**Change password here**
Set MyRange = Intersect(Range("A:A"), Target) '**change range
here**

If Not MyRange Is Nothing Then
Unprotect Password:=Password
MyRange.Locked = True
Protect Password:=Password
End If

End Sub



To put in this macro right click on the worksheet tab and view code, in
the
window that opens paste this code, press Alt and Q to close this window
and
go back to your workbook. If you are using excel 2000 or newer you may
have
to change the macro security settings to get the macro to run. To change
the
security settings go to tools, macro, security, security level and set it
to
medium
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003





"CharlieS" wrote in message
...
I have a spreadsheet that we will be sending out to many users. It will
have
several columns protected and one unprotected so that the users can
enter
a
Yes or no to that column. I want to know if I can have that cell
protected
once the entry is made or do I need to go back and lock that cell
individually? I have 44,000 rows we will be working with and it could
get
very tedious to have to relock each one at the end of the day... HELP!







Paul B

Protecting Cetain Cells in Excel
 
CharlieS,
Not really, I think anything that you do can be bypassed if someone wants to

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"CharlieS" wrote in message
...
Next question - do you know if I can protect the spreadsheet from being
printed? Also can I protect it from being copied? I am not sure what
they
are up to, but these are the tasks I am being asked to accomplish...
Thanks.

"Paul B" wrote:

Your welcome
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"CharlieS" wrote in message
...
Thanks! That's a huge help! I was really worried about having to go
through
all 44 thousand entries each night so you just saved me a huge amount
of
work
and headache!

"Paul B" wrote:

CharlieS, you can with a macro,

Private Sub Worksheet_Change(ByVal Target As Range)
'Automatically Protecting After Input
'unlock all cells in the range first
Dim MyRange As Range
Const Password = "123" '**Change password here**
Set MyRange = Intersect(Range("A:A"), Target) '**change range
here**

If Not MyRange Is Nothing Then
Unprotect Password:=Password
MyRange.Locked = True
Protect Password:=Password
End If

End Sub



To put in this macro right click on the worksheet tab and view code,
in
the
window that opens paste this code, press Alt and Q to close this
window
and
go back to your workbook. If you are using excel 2000 or newer you
may
have
to change the macro security settings to get the macro to run. To
change
the
security settings go to tools, macro, security, security level and set
it
to
medium
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from
it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003





"CharlieS" wrote in message
...
I have a spreadsheet that we will be sending out to many users. It
will
have
several columns protected and one unprotected so that the users can
enter
a
Yes or no to that column. I want to know if I can have that cell
protected
once the entry is made or do I need to go back and lock that cell
individually? I have 44,000 rows we will be working with and it
could
get
very tedious to have to relock each one at the end of the day...
HELP!










All times are GMT +1. The time now is 05:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com