|
|
||||||
|
#1
|
|
|
|
|
Hello,
I'm trying to copy some cells (using VBA) that are protected. Actually the entire sheet with the exception of one column "Q" (for data entry is protected. From the "Copy" button, here is my code: Private Sub CommandCopy_Click() ActiveWorkbook.Sheets("Codes").Unprotect (password) Worksheets("Codes").Range("B2:N11").Select Worksheets("Codes").Range("B2:N11").Copy ' ActiveWorkbook.Sheets("Codes").Protect (password) End Sub This works great if the last line (protect) is commented out. However that leaves the sheet un-protected. If I uncomment the last line, th clipboard somehow becomes erased. Is there any way to make this work? Thanks! Rus |
|
|
|
#2
|
|
|
|
|
hi,
try placing the protect line at the end of your code ie after the pasteing and other work is done. >-----Original Message----- > >Hello, > >I'm trying to copy some cells (using VBA) that are protected. Actually, >the entire sheet with the exception of one column "Q" (for data entry) >is protected. From the "Copy" button, here is my code: > >Private Sub CommandCopy_Click() > >ActiveWorkbook.Sheets("Codes").Unprotect (password) >Worksheets("Codes").Range("B2:N11").Select >Worksheets("Codes").Range("B2:N11").Copy >' ActiveWorkbook.Sheets("Codes").Protect (password) > >End Sub > >This works great if the last line (protect) is commented out. However, >that leaves the sheet un-protected. If I uncomment the last line, the >clipboard somehow becomes erased. Is there any way to make this work? [..] |
|
#3
|
|
|
|
|
I don't use Corel, but maybe you can just:
Private Sub CommandCopy_Click() Worksheets("Codes").Range("B2:N11").copy End Sub RASelkirk wrote: [..] |
|
|
| Similar Threads | |
| Upgrade breaks Office Clipboard workflow? Hi all, I have a user that for a long time has been using Corel Paint Shop Pro Photo X2 for photo management, and Word for creation of reports with his photos. This weekend,... |
|
| Section Breaks in a protected document I am creating a fill-in form that is protected to only allow fill-in information. At the end of the form, I have inserted a picture that the physician would like to be able... |
|
| Clipboard between host and VM breaks What's up with the clipboard between the host and a VM under VPC 2007? It'll work for hours and then suddenly it just doesn't work any more. It'll work on either side... |
|
| Parallels 3.0 build 5160 (OS X 10.5) - breaks protected CD The upgrade to Mac OS X 10.5 was gracefully painless. The first real bummer is that the new compatible Parallels 3.0 buid 5160 breaks running my key learning CD (medical... |
|
| Protected form section breaks I've split a document into two sections. The first section essentially needs to be a form where no core text can be changed, so I've put it as a protected form to activate... |
|
|
All times are GMT. The time now is 02:39 AM. | Privacy Policy
|