Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to lock the Ctrl key? (as locking the Shift key w/Caps Lock) Rick-cel Excel Discussion (Misc queries) 2 August 5th 09 06:45 PM
Locking project with workbook open? Joe90[_2_] Excel Programming 3 November 7th 04 10:30 PM
Locking a project Hari[_3_] Excel Programming 2 August 26th 04 10:56 PM
Locking VBA code via Project properties but cannot save the workbook over itself Shane Excel Programming 4 July 27th 04 01:00 AM
Locking project jacob[_3_] Excel Programming 1 October 2nd 03 01:06 PM


All times are GMT +1. The time now is 05:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"