Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Unable to prevent copy/paste of protected worksheet into new docum

I'm working on a price list which contains confidential information, i.e.
costs, which i have protected. Even when locked, if i select the entire
worksheet and copy, i can paste it in another document and everything hidden
and protected on the original document is now completely available.
How can this be secure??
  #2   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Unable to prevent copy/paste of protected worksheet into new docum

It's not.

http://www.mcgimpsey.com/excel/removepwords.html



"Richard R." wrote:

I'm working on a price list which contains confidential information, i.e.
costs, which i have protected. Even when locked, if i select the entire
worksheet and copy, i can paste it in another document and everything hidden
and protected on the original document is now completely available.
How can this be secure??

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Unable to prevent copy/paste of protected worksheet into new docum

try this
Sub protectActiveSheet()
Dim myPassword As String
ActiveSheet.Select
ActiveSheet.Copy
'Change 123456 to your password
myPassword = "123456"

ActiveSheet.Protect myPassword, True
End Sub

"Richard R." wrote:

I'm working on a price list which contains confidential information, i.e.
costs, which i have protected. Even when locked, if i select the entire
worksheet and copy, i can paste it in another document and everything hidden
and protected on the original document is now completely available.
How can this be secure??

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Unable to prevent copy/paste of protected worksheet into new d

JMB,
Thanks for your quick reply. Do you have any suggestions on how a can
achieve what i want to do?

"JMB" wrote:

It's not.

http://www.mcgimpsey.com/excel/removepwords.html



"Richard R." wrote:

I'm working on a price list which contains confidential information, i.e.
costs, which i have protected. Even when locked, if i select the entire
worksheet and copy, i can paste it in another document and everything hidden
and protected on the original document is now completely available.
How can this be secure??

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Unable to prevent copy/paste of protected worksheet into new d

I don't know if i'm doing something wrong but it still doesn't work!
Any advice?

"Mike" wrote:

try this
Sub protectActiveSheet()
Dim myPassword As String
ActiveSheet.Select
ActiveSheet.Copy
'Change 123456 to your password
myPassword = "123456"

ActiveSheet.Protect myPassword, True
End Sub

"Richard R." wrote:

I'm working on a price list which contains confidential information, i.e.
costs, which i have protected. Even when locked, if i select the entire
worksheet and copy, i can paste it in another document and everything hidden
and protected on the original document is now completely available.
How can this be secure??



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 182
Default Unable to prevent copy/paste of protected worksheet into new d

Hi,

You can try this one :
Sub DisableCopy()
'disable every copy button
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl

'disable copy button in the Edit menu
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0

'disable Ctrl+C
Application.OnKey "^c", ""
End Sub

if you want to enabled them again change .Enabled = 1
and
change Application.OnKey "^c", "" to Application.OnKey "^c"
--

Regards,

Halim


"Richard R." wrote:

I don't know if i'm doing something wrong but it still doesn't work!
Any advice?

"Mike" wrote:

try this
Sub protectActiveSheet()
Dim myPassword As String
ActiveSheet.Select
ActiveSheet.Copy
'Change 123456 to your password
myPassword = "123456"

ActiveSheet.Protect myPassword, True
End Sub

"Richard R." wrote:

I'm working on a price list which contains confidential information, i.e.
costs, which i have protected. Even when locked, if i select the entire
worksheet and copy, i can paste it in another document and everything hidden
and protected on the original document is now completely available.
How can this be secure??

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 182
Default Unable to prevent copy/paste of protected worksheet into new d

Sory should be add 'On error resume next' before code...
Sub DisableCopy()
On Error Resume Next
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0
Application.OnKey "^c", ""
End Sub

--

Regards,

Halim


"Halim" wrote:

Hi,

You can try this one :
Sub DisableCopy()
'disable every copy button
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl

'disable copy button in the Edit menu
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0

'disable Ctrl+C
Application.OnKey "^c", ""
End Sub

if you want to enabled them again change .Enabled = 1
and
change Application.OnKey "^c", "" to Application.OnKey "^c"
--

Regards,

Halim


"Richard R." wrote:

I don't know if i'm doing something wrong but it still doesn't work!
Any advice?

"Mike" wrote:

try this
Sub protectActiveSheet()
Dim myPassword As String
ActiveSheet.Select
ActiveSheet.Copy
'Change 123456 to your password
myPassword = "123456"

ActiveSheet.Protect myPassword, True
End Sub

"Richard R." wrote:

I'm working on a price list which contains confidential information, i.e.
costs, which i have protected. Even when locked, if i select the entire
worksheet and copy, i can paste it in another document and everything hidden
and protected on the original document is now completely available.
How can this be secure??

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Unable to prevent copy/paste of protected worksheet into new d

Thanks much Halim.
It works well. However, do you know how to hide or prevent macros from being
seen or edited?

Thanks again!

Richard R.

"Halim" wrote:

Sory should be add 'On error resume next' before code...
Sub DisableCopy()
On Error Resume Next
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0
Application.OnKey "^c", ""
End Sub

--

Regards,

Halim


"Halim" wrote:

Hi,

You can try this one :
Sub DisableCopy()
'disable every copy button
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl

'disable copy button in the Edit menu
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0

'disable Ctrl+C
Application.OnKey "^c", ""
End Sub

if you want to enabled them again change .Enabled = 1
and
change Application.OnKey "^c", "" to Application.OnKey "^c"
--

Regards,

Halim


"Richard R." wrote:

I don't know if i'm doing something wrong but it still doesn't work!
Any advice?

"Mike" wrote:

try this
Sub protectActiveSheet()
Dim myPassword As String
ActiveSheet.Select
ActiveSheet.Copy
'Change 123456 to your password
myPassword = "123456"

ActiveSheet.Protect myPassword, True
End Sub

"Richard R." wrote:

I'm working on a price list which contains confidential information, i.e.
costs, which i have protected. Even when locked, if i select the entire
worksheet and copy, i can paste it in another document and everything hidden
and protected on the original document is now completely available.
How can this be secure??

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Unable to prevent copy/paste of protected worksheet into new d

Well, i found something else: Kalim's suggestion worked. However when the
macro disable the copy fonction, it doesn't turn it back on when you close
the workbook. How can this be avoid?

Any help will be much appreciated.

Thanks,

Richard R.

"Richard R." wrote:

Thanks much Halim.
It works well. However, do you know how to hide or prevent macros from being
seen or edited?

Thanks again!

Richard R.

"Halim" wrote:

Sory should be add 'On error resume next' before code...
Sub DisableCopy()
On Error Resume Next
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0
Application.OnKey "^c", ""
End Sub

--

Regards,

Halim


"Halim" wrote:

Hi,

You can try this one :
Sub DisableCopy()
'disable every copy button
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl

'disable copy button in the Edit menu
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0

'disable Ctrl+C
Application.OnKey "^c", ""
End Sub

if you want to enabled them again change .Enabled = 1
and
change Application.OnKey "^c", "" to Application.OnKey "^c"
--

Regards,

Halim


"Richard R." wrote:

I don't know if i'm doing something wrong but it still doesn't work!
Any advice?

"Mike" wrote:

try this
Sub protectActiveSheet()
Dim myPassword As String
ActiveSheet.Select
ActiveSheet.Copy
'Change 123456 to your password
myPassword = "123456"

ActiveSheet.Protect myPassword, True
End Sub

"Richard R." wrote:

I'm working on a price list which contains confidential information, i.e.
costs, which i have protected. Even when locked, if i select the entire
worksheet and copy, i can paste it in another document and everything hidden
and protected on the original document is now completely available.
How can this be secure??

  #10   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Unable to prevent copy/paste of protected worksheet into new d

You could protect the VBA project. In the VBA editor, right click your
project, select properties, and enter a password. After you save and reopen
it should ask for the password before viewing the project.

Of course, worksheet protection and VBA project protection are easily
removed (depending on how much effort your users want to put into cracking
it). There is also third party software readily available to crack excel's
passwords.

Here's a thread regarding VBA protection:
http://www.microsoft.com/office/comm...xp=&sloc=en-us

Also, if you use code to disable the copy feature, remember that the code
doesn't run if the user sets the security to high.


"Richard R." wrote:

Thanks much Halim.
It works well. However, do you know how to hide or prevent macros from being
seen or edited?

Thanks again!

Richard R.

"Halim" wrote:

Sory should be add 'On error resume next' before code...
Sub DisableCopy()
On Error Resume Next
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0
Application.OnKey "^c", ""
End Sub

--

Regards,

Halim


"Halim" wrote:

Hi,

You can try this one :
Sub DisableCopy()
'disable every copy button
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl

'disable copy button in the Edit menu
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0

'disable Ctrl+C
Application.OnKey "^c", ""
End Sub

if you want to enabled them again change .Enabled = 1
and
change Application.OnKey "^c", "" to Application.OnKey "^c"
--

Regards,

Halim


"Richard R." wrote:

I don't know if i'm doing something wrong but it still doesn't work!
Any advice?

"Mike" wrote:

try this
Sub protectActiveSheet()
Dim myPassword As String
ActiveSheet.Select
ActiveSheet.Copy
'Change 123456 to your password
myPassword = "123456"

ActiveSheet.Protect myPassword, True
End Sub

"Richard R." wrote:

I'm working on a price list which contains confidential information, i.e.
costs, which i have protected. Even when locked, if i select the entire
worksheet and copy, i can paste it in another document and everything hidden
and protected on the original document is now completely available.
How can this be secure??



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Unable to prevent copy/paste of protected worksheet into new d

On May 1, 7:55 pm, JMB wrote:
You could protect the VBA project. In the VBA editor, right click your
project, select properties, and enter a password. After you save and reopen
it should ask for the password before viewing the project.

Of course, worksheet protection and VBA project protection are easily
removed (depending on how much effort your users want to put into cracking
it). There is also third party software readily available to crack excel's
passwords.

Here's a thread regarding VBA protection:http://www.microsoft.com/office/comm....mspx?query=vb...

Also, if you use code to disable the copy feature, remember that the code
doesn't run if the user sets the security to high.



"Richard R." wrote:
Thanks much Halim.
It works well. However, do you know how to hide or prevent macros from being
seen or edited?


Thanks again!


Richard R.


"Halim" wrote:


Sory should be add 'On error resume next' before code...
Sub DisableCopy()
On Error Resume Next
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0
Application.OnKey "^c", ""
End Sub


--


Regards,


Halim


"Halim" wrote:


Hi,


You can try this one :
Sub DisableCopy()
'disable every copy button
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl


'disable copy button in the Edit menu
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0


'disable Ctrl+C
Application.OnKey "^c", ""
End Sub


if you want to enabled them again change .Enabled = 1
and
change Application.OnKey "^c", "" to Application.OnKey "^c"
--


Regards,


Halim


"Richard R." wrote:


I don't know if i'm doing something wrong but it still doesn't work!
Any advice?


"Mike" wrote:


try this
Sub protectActiveSheet()
Dim myPassword As String
ActiveSheet.Select
ActiveSheet.Copy
'Change 123456 to your password
myPassword = "123456"


ActiveSheet.Protect myPassword, True
End Sub


"Richard R." wrote:


I'm working on a price list which contains confidential information, i.e.
costs, which i have protected. Even when locked, if i select the entire
worksheet and copy, i can paste it in another document and everything hidden
and protected on the original document is now completely available.
How can this be secure??- Hide quoted text -


- Show quoted text -


Hi,

Since we have the code to disable copy function, how to modify it to
disable "cut" function in the standard tool bar menu?

Thanks,

G

  #12   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Unable to prevent copy/paste of protected worksheet into new d

Using Halim's macro - I think you need to change the ID to 21 and the hotkey
to "x"

Sub DisableCopy()
Dim ctl As CommandBarControl
On Error Resume Next
For Each ctl In Application.CommandBars.FindControls(ID:=21)
ctl.Enabled = 0
Next ctl
Application.CommandBars(1).Controls(2).FindControl (ID:=21).Enabled = 0
Application.OnKey "^x", ""
End Sub

"George" wrote:

On May 1, 7:55 pm, JMB wrote:
You could protect the VBA project. In the VBA editor, right click your
project, select properties, and enter a password. After you save and reopen
it should ask for the password before viewing the project.

Of course, worksheet protection and VBA project protection are easily
removed (depending on how much effort your users want to put into cracking
it). There is also third party software readily available to crack excel's
passwords.

Here's a thread regarding VBA protection:http://www.microsoft.com/office/comm....mspx?query=vb...

Also, if you use code to disable the copy feature, remember that the code
doesn't run if the user sets the security to high.



"Richard R." wrote:
Thanks much Halim.
It works well. However, do you know how to hide or prevent macros from being
seen or edited?


Thanks again!


Richard R.


"Halim" wrote:


Sory should be add 'On error resume next' before code...
Sub DisableCopy()
On Error Resume Next
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0
Application.OnKey "^c", ""
End Sub


--


Regards,


Halim


"Halim" wrote:


Hi,


You can try this one :
Sub DisableCopy()
'disable every copy button
For Each ctl In Application.CommandBars.FindControls(ID:=19)
ctl.Enabled = 0
Next ctl


'disable copy button in the Edit menu
Application.CommandBars(1).Controls(2).FindControl (ID:=19).Enabled = 0


'disable Ctrl+C
Application.OnKey "^c", ""
End Sub


if you want to enabled them again change .Enabled = 1
and
change Application.OnKey "^c", "" to Application.OnKey "^c"
--


Regards,


Halim


"Richard R." wrote:


I don't know if i'm doing something wrong but it still doesn't work!
Any advice?


"Mike" wrote:


try this
Sub protectActiveSheet()
Dim myPassword As String
ActiveSheet.Select
ActiveSheet.Copy
'Change 123456 to your password
myPassword = "123456"


ActiveSheet.Protect myPassword, True
End Sub


"Richard R." wrote:


I'm working on a price list which contains confidential information, i.e.
costs, which i have protected. Even when locked, if i select the entire
worksheet and copy, i can paste it in another document and everything hidden
and protected on the original document is now completely available.
How can this be secure??- Hide quoted text -


- Show quoted text -


Hi,

Since we have the code to disable copy function, how to modify it to
disable "cut" function in the standard tool bar menu?

Thanks,

G


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
Prevent cut & paste in a protected worksheet. JJ in LA[_2_] Excel Discussion (Misc queries) 0 April 5th 10 08:46 PM
how to copy and paste in a protected worksheet CaptainQuattro[_4_] Excel Programming 3 August 16th 06 09:24 PM
how to copy and paste in a protected worksheet CaptainQuattro[_3_] Excel Programming 0 August 14th 06 04:04 AM
allow me to copy and paste in a protected worksheet George New Users to Excel 3 August 13th 06 08:11 PM
Prevent changing size when copy&paste into another Excel Worksheet Michelle Excel Worksheet Functions 0 June 26th 06 04:30 PM


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