PDA

View Full Version : VBA Module



joms
03-21-2011, 07:16 PM
hi guys, excel 2k7 provides an option to export bas module. Is there a way to protect with a password the exported bas module? and when the user uses it will just insert the bas module but will not be able to view the code?

is there a way to do it, or no way?

thanks for any ideas.

Jan Karel Pieterse
03-22-2011, 01:54 AM
No, you cannot password protect a textfile.
Perhaps you can describe what it is you're trying to achieve?

Kenneth Hobs
03-22-2011, 08:33 AM
Put it in an Add-In if you want to protect it.

CareerChange
03-22-2011, 09:02 AM
In Excel 2K3, you have to know the workbook password before you can export one of the included .bas files. Which leads me to ask the question that if the person already is trusted enough to have the password to the workbook, what harm is there in looking at the source code?

joms
03-23-2011, 03:47 AM
hi guys, thanks for your ideas. i was just trying my luck whether there was a way, to protect bas module. The only way to protect the module is either put the module on the workbook and protect the project.
Or as Kenneth suggested put it as add-in.

But one day soon, maybe microsoft will find a way on how to protect bas module. hmm..just shooting the stars..LOL

Zack Barresse
03-23-2011, 10:23 AM
I wouldn't hold your breath for that to ever happen. It's not really a needed functionality. Not when they belong in a VBProject and you can protect the project.

joms
03-24-2011, 11:27 PM
I wouldn't hold your breath for that to ever happen. It's not really a needed functionality. Not when they belong in a VBProject and you can protect the project.

What if you have a macro that you want it to be available anywhere you go, and when you need it you just insert the module to excel and then run it.

But ofcourse, you have don't want somebody to view your code. so it really doesn't matter whether someone can take hold of the module because they cannot view the code (unless they crack the password).

Anyway, this is just my point of view...hehe.. :friends: