保护Excel VBA代码的最佳方法? [英] Best way to protect Excel VBA code?

查看:959
本文介绍了保护Excel VBA代码的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经组织了一个简单的Excel数据库,执行一些宏功能,我需要将这个数据库分发给几个人 - 但是他们看不到宏功能如何实际工作(愚蠢的规则我必须遵循!)。实现这一点的最好方法是什么?



我做了一些研究,我发现了两种方法:




  • 密码保护VBA项目;但是这显然很容易在线上使用随时可用的工具来打破(对于发送这个宏的人来说,这是最符合我的意思),所以我几乎可以肯定他们会尝试


  • 移动到完全编译的语言,如C ++ ;我的技能是非常局限于Excel和Access上的VBA,所以这是理想的解决方案;不是我的解决方案:(




还有其他方法吗?我想到了所有的宏都有一个master excel文档,然后将'children'数据库发送给最终用户,并将'children'数据库连接到'master' - 是什么东西像这样可能吗?通过在线托管主人,甚至发送最终用户的主人,但是使其完全无法访问,除非被儿童数据库访问。

解决方案

ÿ ou可以创建自动添加。



自动添加提供了几个优点




  • 执行速度:以VB6编写的自动添加 被编译为
    本机机器代码,运行速度比解释的VBA
    快得多langange。


  • 安全性:与XLA添加不同,您不会将源代码分发给最终用户。如果您的代码具有专有信息或
    知识产权价值,那么您的
    自己的计算机上将保持安全的保护。它从未分发给用户。你的代码可以
    永远不会被泄露。




http://www.cpearson.com/excel/automationaddins.aspx


I've put together a simple Excel database that performs a few macro functions and I need to distribute this database to a few people - but they cannot see how the macro function actually works (stupid rules I have to follow!). What is the best way to achieve this?

I've done a bit of research and I found two ways:

  • Password protect the VBA project; but this is apparently very easy to break using readily available tools online (it would be in the best interest to the people I'm sending this to find out how the macros and functions work; so I'm almost 100% sure they will try to get into it.. hence a password protection seems inadequate.

  • Move to a fully compiled language like C++; my skills are very limited to VBA on Excel and Access so this being the ideal solution; isn't a solution for me :(

Are there any other ways? I thought of having a 'master excel document' with all the macros in that and then send 'children' databases to the end users and have the 'children' databases connect to the 'master' - is something like this possible? By hosting the master online or even sending the end users the master but making it completely inaccessible unless accessed by the 'children' databases?

解决方案

You can create Automation Add In.

An Automation Add In provides several advantages

  • Execution Speed : An Automation Add In written in VB6 is compiled to native machine code which runs much faster than the interpreted VBA languange.

  • Security : Unlike an XLA add in, you never distribute the source code to the end users. If your code has proprietary information or intellectual property value, that remains safely protected on your own computer. It is never distributed to the user. Your code can never be compromised.

http://www.cpearson.com/excel/automationaddins.aspx

这篇关于保护Excel VBA代码的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆