PDA

View Full Version : test of KB code on Disable Cut, Copy, Paste



FoxProUser
05-06-2009, 12:45 PM
I inserted the code from
http://www.vbaexpress.com/kb/getarticle.php?kb_id=373
according to the instructions.

After I closed my workbook and re-opened it, the Edit/Copy capability was not disabled. I am using version 2007 and, yes, I did select the option to enable macros.

Does anyone have a suggestion about how to fix this?

thanks!

lucas
05-06-2009, 12:57 PM
I don't have 07 so I can't test this for you but Ken indicates in the kb entry that it works on 2007 so my first question would be, did you notice this part in the code section:


'*** In the ThisWorkbook Module ***



And did you put the code below that into the "thisworkbook" module?

FoxProUser
05-06-2009, 02:40 PM
Yes, and I put the main block of code into the file module as specified in Ken's instructions.







I don't have 07 so I can't test this for you but Ken indicates in the kb entry that it works on 2007 so my first question would be, did you notice this part in the code section:


'*** In the ThisWorkbook Module ***


And did you put the code below that into the "thisworkbook" module?

lucas
05-06-2009, 08:11 PM
As I said, I don't have 2007. the code seems to work in 03 and I have attached Kens sample file from the kb you linked to for you to try. Let me know if it works for you when you open it in 2007

FoxProUser
05-07-2009, 12:54 AM
Thank you for sending this sample file. Here is what happens when I open it in my installation of Excel 2007. I have a "Security Warning" at the top which reads "Macros have been disabled." I click on the "Options" button next to this. Then, I select "Enable this content" in the pop-up box and click "OK." Following that, I tested the Copy/Paste and it was not disabled. I did a Copy followed by a Paste.

FoxProUser
05-08-2009, 02:28 AM
I just tried the test of this sample file again. This time I pre-set my options to enable all Macros in advance. The code is still not working in my installation of the 2007 software. Copy and Paste were not disabled.












As I said, I don't have 2007. the code seems to work in 03 and I have attached Kens sample file from the kb you linked to for you to try. Let me know if it works for you when you open it in 2007

lucas
05-08-2009, 08:57 AM
Maybe you could get in on this thread:

http://www.vbaexpress.com/forum/showthread.php?p=184032#post184032