keeping VBA code and workbooks private

RET79

Well-known Member
Joined
Mar 19, 2002
Messages
526
Hi.

I need to know what possibilities are there for protecting and restricting other users using, viewing or copying my macros & accompanying workbooks.

There is a delicate situation at work, in that, some people are using and tweaking my macros and calling it their own, then making claims for payrises based on 'their' work. This is upsetting. From now on, I want to totally protect every macro I write by not making it viewable or usable by others without a password. Then I can claim it as my work.

Of course one way would be to put my macros on a floppy disk and bring it with me everyday....

Also, what tends to happen is that some people ask me to write them a macro to be used as part of their project. Lately the bastards have been claiming they did the whole project, even though without my macro it would not be a project. So if I send someone a macro, is there anyway to document explicitly who created it?

Any suggestions? This is a sad situation to have to be in really...

RET79
This message was edited by RET79 on 2002-04-27 07:33
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
On 2002-04-27 07:31, RET79 wrote:
Hi.

I need to know what possibilities are there for protecting and restricting other users using, viewing or copying my macros & accompanying workbooks.

There is a delicate situation at work, in that, some people are using and tweaking my macros and calling it their own, then making claims for payrises based on 'their' work. This is upsetting. From now on, I want to totally protect every macro I write by not making it viewable or usable by others without a password. Then I can claim it as my work.

Of course one way would be to put my macros on a floppy disk and bring it with me everyday....

Also, what tends to happen is that some people ask me to write them a macro to be used as part of their project. Lately the bastards have been claiming they did the whole project, even though without my macro it would not be a project. So if I send someone a macro, is there anyway to document explicitly who created it?

Any suggestions? This is a sad situation to have to be in really...

RET79
This message was edited by RET79 on 2002-04-27 07:33

To protect your macros from being modified you can do so by choosing Tools > VBA Project on the menu bar. Click the Protection tab, check Lock project for viewing and enter a password.

To protect your macros from being used by others you can use a form that ask for a password at the beginning of your code.
 
Upvote 0
Ret79

I agree that, as a first step, you can apply a password to a project to protect the code. There is, however, no really foolproof way to protect your code in Excel if others really want to view it. There are many "*******" programmes freely available. These may be used to open you project, even though it is password protected.

It would seem there may be a couple of issues to consider. Firstly, do you write the code or do you record macros using the Macro Recorder? If it is the latter, I'm not too sure you could claim it as your own. If, however, you write the code it could be a different matter.

If you write the code yourself, perhaps the first step would be to indicate your copyright at the top of each module or procedure. Then, take a print of all code you write.

If you believe others are using your code, you will have some proof that you were the originator and could take it to the powers that be in your organisation. You would probably only ever have to do this once as word would quickly spread that you are willing to protect your work.

Just a couple of issues to consider. Hope it helps.

Regards

Robb__
 
Upvote 0
Just another thought, always try to be ahead of the others, in technology (Use XP), in security "features", as a programmer you should try to be ahead of the rest, particulary in this subject.
 
Upvote 0
juan

OK what if as many guys are are not Xp.. i dot like Xp as its childish, in that is to highlight..

what then?
 
Upvote 0
Hello

Microsoft has never promoted excel as a product with strong security.
Unfortunately , if you want to be sure that noone ever see your vba code or formulas
excel is not the best choice.
 
Upvote 0
Hi everyone, thanks for your postings.

I don't think that the people who I fear will use and claim my code as their own have the skills necessary to penetrate into protected code. I think that simply protecting as suggested is the best idea for my and is enough for my needs.

I also like the idea of printing out my codes, to document them as my own.

Also, I will bring in a floppy disc and keep my own excel tools I have developed (things like a handy way of opening text files, extracting data etc.) and keep them on my disc not on my work's hard disk.

Thanks guys,

RET79
 
Upvote 0
It's pretty common practice to stick in comments like this at the start of modules, or even at the subroutine level. I used one of Stephen Bullen's codes in an application and still have his header on it, I use a shorter version personally. I feel this is a good example though. This way, even if people still use your macros, you still have some kind of evidence that you created it. Even if/when they delete the header.

<pre>
'***************************************************************************
'*
'* MODULE NAME: Paste Picture
'* AUTHOR & DATE: STEPHEN BULLEN, Business Modelling Solutions Ltd.
'* 15 November 1998
'*
'* CONTACT: Stephen@BMSLtd.co.uk
'* WEB SITE: http://www.BMSLtd.co.uk
'*
'* DESCRIPTION: Creates a standard Picture object from whatever is on the clipboard.
'* This object can then be assigned to (for example) and Image control
'* on a userform. The PastePicture function takes an optional argument of
'* the picture type - xlBitmap or xlPicture.
'*
'* The code requires a reference to the "OLE Automation" type library
'*
'* The code in this module has been derived from a number of sources
'* discovered on MSDN.
'*
'* To use it, just copy this module into your project, then you can use:
'* Set Image1.Picture = PastePicture(xlPicture)
'* to paste a picture of whatever is on the clipboard into a standard image control.
'*
'* PROCEDURES:
'* PastePicture The entry point for the routine
'* CreatePicture Private function to convert a bitmap or metafile handle to an OLE reference
'* fnOLEError Get the error text for an OLE error code
'***************************************************************************
</pre>
 
Upvote 0

Forum statistics

Threads
1,213,482
Messages
6,113,913
Members
448,532
Latest member
9Kimo3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top