Hi all
Complete newbie here in terms of VBA, intermediate in terms of Excel overall. I found the site as I was looking for a way of disabling cut, copy and paste functionality, as well as forcing users to enable Macros. Essentially, I want to provide a number of users with a massive volume of data, but I don't want them being able to copy it.
Ken Puls provided two excellent articles which work perfectly separately as code. Firstly, "Force users to enable macros in a workbook", and then secondly "Disable Cut, Copy, Paste" (I apologise, my post count won't allow me to post links)
However, when I try to use the two Macros together I get the error message "Ambiguous name detected: Workbook_BeforeClose". I gather this error message appears when the same subroutines appear twice or more in the same module (and hence if I was to resolve this error, other recurring subroutines in the module would cause similar issues). My understanding therefore is that the subroutines themselves need to be combined into one. Has anyone come across a macro which combines the above, or alternatively could provide me with some help in doing so? I'm working in Excel 2007, if that makes any difference.
The code for both Macros as written by Ken is as per the attachment.
Thanks in advance.