Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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?? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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?? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Prevent cut & paste in a protected worksheet. | Excel Discussion (Misc queries) | |||
how to copy and paste in a protected worksheet | Excel Programming | |||
how to copy and paste in a protected worksheet | Excel Programming | |||
allow me to copy and paste in a protected worksheet | New Users to Excel | |||
Prevent changing size when copy&paste into another Excel Worksheet | Excel Worksheet Functions |