+ Reply to Thread
Results 1 to 4 of 4

Lock single Module ONLY in workbook; without locking VBA project?

  1. #1
    Registered User
    Join Date
    08-20-2006
    Posts
    2

    Lock single Module ONLY in workbook; without locking VBA project?

    I have a workbook(1), contains a worksheet that once filled with user entered parameters, generates data through a VBA module (macro). This module(1) is a proprietary algorithm, and the author has locked the VBA project to protect the module from being tampered with/modified (and rightly so).

    I take this data and use it as input in my own algorithms to generate more data. By locking "VBA project" in that workbook(1), I can't see anyway to add my own module(2) to that particular workbook(1). I can create another workbook(2), and write a module(2) there that reads the data from the first workbook(1), but then I'm left with TWO workbooks to do a single task, both have to be opened, and its just not a very elegant way of doing things.

    I've contacted the author of the proprietary module(1), and he has no problem modifying the lock protection in the workbook(1) so that only his module(1) is locked, but VBA is not really his forte, and he doesn't know how to do it, or if it is even possible. I've checked many Excel Help facilities, and could not find an answer.

    Anyway to lock a SINGLE VBA module within a workbook?

    Also, is there only ONE VBA project allowed per workbook? If I could add an unprotected VBA project, I could add my own module.

    Thanks for any help.

  2. #2
    Tim Williams
    Guest

    Re: Lock single Module ONLY in workbook; without locking VBA project?

    As far as I know, only one project per workbook, and that project will have
    "all or none" protection.
    It's not possible to lock only part of a project.

    The "secret" algorithm might be better converted to an add-in whose code
    would allow you to pass either all of the required input parameters or a
    reference to a fixed format "input" sheet, which could be added to your
    project.

    Tim


    "Kootenay" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I have a workbook(1), contains a worksheet that once filled with user
    > entered parameters, generates data through a VBA module (macro). This
    > module(1) is a proprietary algorithm, and the author has locked the VBA
    > project to protect the module from being tampered with/modified (and
    > rightly so).
    >
    > I take this data and use it as input in my own algorithms to generate
    > more data. By locking "VBA project" in that workbook(1), I can't see
    > anyway to add my own module(2) to that particular workbook(1). I can
    > create another workbook(2), and write a module(2) there that reads the
    > data from the first workbook(1), but then I'm left with TWO workbooks
    > to do a single task, both have to be opened, and its just not a very
    > elegant way of doing things.
    >
    > I've contacted the author of the proprietary module(1), and he has no
    > problem modifying the lock protection in the workbook(1) so that only
    > his module(1) is locked, but VBA is not really his forte, and he
    > doesn't know how to do it, or if it is even possible. I've checked many
    > Excel Help facilities, and could not find an answer.
    >
    > Anyway to lock a SINGLE VBA module within a workbook?
    >
    > Also, is there only ONE VBA project allowed per workbook? If I could
    > add an unprotected VBA project, I could add my own module.
    >
    > Thanks for any help.
    >
    >
    > --
    > Kootenay
    > ------------------------------------------------------------------------
    > Kootenay's Profile:
    > http://www.excelforum.com/member.php...o&userid=37795
    > View this thread: http://www.excelforum.com/showthread...hreadid=573590
    >




  3. #3
    Registered User
    Join Date
    08-20-2006
    Posts
    2
    Thanks for your help Tim;

    You have confirmed what I suspected, I'm a little surprised that the protection is not a little more flexible, but cest la vie.

    Ha! the algorithm is not really that "secret" I think the author just wants to ensure it remains intact, and altered versions aren't copied and sent all over, producing garbage output for unsuspecting users. If it was visible, I don't think he would really care much.

    Do you know of any way to run a module in a protected VB project (this case) from another module in a 2nd workbook? I tried this as well, and doesn't seem to work either.

  4. #4
    Tim Williams
    Guest

    Re: Lock single Module ONLY in workbook; without locking VBA project?

    Eg:

    Application.Run "addin.xla!other_macro"

    Tim

    "Kootenay" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for your help Tim;
    >
    > You have confirmed what I suspected, I'm a little surprised that the
    > protection is not a little more flexible, but cest la vie.
    >
    > Ha! the algorithm is not really that "secret" I think the author
    > just wants to ensure it remains intact, and altered versions aren't
    > copied and sent all over, producing garbage output for unsuspecting
    > users. If it was visible, I don't think he would really care much.
    >
    > Do you know of any way to run a module in a protected VB project (this
    > case) from another module in a 2nd workbook? I tried this as well, and
    > doesn't seem to work either.
    >
    >
    > --
    > Kootenay
    > ------------------------------------------------------------------------
    > Kootenay's Profile:
    > http://www.excelforum.com/member.php...o&userid=37795
    > View this thread: http://www.excelforum.com/showthread...hreadid=573590
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1