ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Lock single Module ONLY in workbook; without locking VBA project? (https://www.excelbanter.com/excel-programming/370930-lock-single-module-only-workbook%3B-without-locking-vba-project.html)

Kootenay

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

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

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

I've contacted the author of the proprietary module(1), and he has n
problem modifying the lock protection in the workbook(1) so that onl
his module(1) is locked, but VBA is not really his forte, and h
doesn't know how to do it, or if it is even possible. I've checked man
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 coul
add an unprotected VBA project, I could add my own module.

Thanks for any help

--
Kootena
-----------------------------------------------------------------------
Kootenay's Profile: http://www.excelforum.com/member.php...fo&userid=3779
View this thread: http://www.excelforum.com/showthread.php?threadid=57359


Tim Williams

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" wrote in
message ...

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




Kootenay[_2_]

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

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


Tim Williams

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

Application.Run "addin.xla!other_macro"

Tim

"Kootenay" wrote in
message ...

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





All times are GMT +1. The time now is 06:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com