Thanks Thanks:  0
Likes Likes:  0
Results 1 to 8 of 8

Thread: keeping VBA code and workbooks private

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    England, UK.
    Posts
    526
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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 ]

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Posts
    363
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.
    It's never too late to learn something new.

    Ricky

  3. #3
    New Member
    Join Date
    Apr 2002
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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 "cracker" 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__

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  5. #5
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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?

    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  6. #6
    Board Regular sen_edp's Avatar
    Join Date
    Mar 2002
    Location
    Hellas
    Posts
    555
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.


  7. #7
    Board Regular
    Join Date
    Mar 2002
    Location
    England, UK.
    Posts
    526
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

  8. #8
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.


    '***************************************************************************
    '*
    '* 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
    '***************************************************************************

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •