-1

My question might sound stupid but please bear with me :-)

I have an excel file, was doing some manual task, converted them to VBA code in order to automate. Works well.

I then decided why not distribute this. So, I went about searching for ways to protect the VBA code and found none. The most probable way was to convert it to DLL and call the DLL using "Tools-> add references->mytoolsDLL" inside excel. As the DLL code is not seen it does offer some protection. So, I looked up how to convert my VBA to DLL. Solution found "Visual Studio-> Class Library Project"! SO converted almost all VBA to DLL using Class Library Project, compiled, registered my DLL, used it inside Excel, all good, works well.

Now, this DLL I have compiled I dont know if it is classified as "COM add-in" or ".NET" DLL! Today I realised that it was very easy to "de-compile" a .NET DLL. I tried looking at "code" difference between a COM ADDIN and .NET there is almost none. When coding this "DLL", I was using google and MSDN a lot but they all referenced it as "VB"

If I am converting VBA to something, should it be "COM ADD-IN" or ".NET"? I read about VSTO today and was wondering how does VSTO come inbetween Visual Studio and COM ADDIN/.NET? What techniques can I use to ensure that the DLL when distributed can be license controlled? i.e. after first "install" the DLL cannot be copied to other machines? Is it possible to do license management/control via VSTO?

p.s: If you think I am mixing up terms/terminologies please feel free to correct me

Community
  • 1
  • 1
user2979010
  • 357
  • 1
  • 8
  • 18
  • I would suggest looking at your other questions with answers and accept if they helped you. In the long run people would be glad to help you... – Trevor Jul 17 '14 at 02:52
  • @MrCoDeXeR, and you are refering to? – user2979010 Jul 17 '14 at 03:00
  • You, people take time to help you with your issues. If they helped you, you need to accept their answers. – Trevor Jul 17 '14 at 03:07
  • @MrCoDeXeR, yes I know it was me. But what question of mine are you refering to? If my question says "I did A, B and C, not working what other options do I have" and the person answers with "you should A" and then says "try b".. do i accept them as answers? – user2979010 Jul 17 '14 at 03:09
  • What ever question helped you, I can't determine that. When people don't accept the solutions other people see that and may not help... – Trevor Jul 17 '14 at 03:11
  • @MrCoDeXeR, in my opinion if a poster of a question accepts a "solution" to his particular question then it would mean "the poster of this question found the solution offered by X useful". On other hand offering the same thing as solution which was detailed in the question (may be slightly differently), to me, comes across as someone trying to get "internet points"! What do you think? Should I promote such behaviour? in favour of getting myself some internet points? – user2979010 Jul 17 '14 at 03:21
  • Also just a thought, you can move DLL'S anywhere... you can't stop that behaviour. .. – Trevor Jul 17 '14 at 03:27
  • Thanks @MrCoDeXeR. It is quite unfortunate that you don't intend to answer. This is internet, so no hard feelings :-) – user2979010 Jul 17 '14 at 03:30
  • @MrCoDeXeR, yes that is correct. But is there a way to "clamp the DLL to MAC address" during first run or during registering process – user2979010 Jul 17 '14 at 03:32
  • 1
    No, that can be changed. – Trevor Jul 17 '14 at 03:32

1 Answers1

1

Why not just right click your project once you are in the developer environment, select VBAProject Properties, select Protection Tab and set a password to protect your vba project ?

Thundereagle
  • 143
  • 1
  • 1
  • 10
  • Isn't Excel-VBA password protection easily breakable? Moreover, by doing that the end-user cannot use the functionalities I provide to build their application on top. let me know if I am wrong? – user2979010 Jul 17 '14 at 12:03
  • Depends what you call easy I suppose. For more information on this toppic, read the following: http://stackoverflow.com/questions/1026483/is-there-a-way-to-crack-the-password-on-an-excel-vba-project/5427590#5427590 I am not sure what you mean by "the end-user cannot use the functionalities I provide to build their application on top" – Thundereagle Jul 18 '14 at 08:25
  • 1
    If I am providing a "dll" that can added as "Reference" in excel-vba, the excel/VBA itself is open for the end-user to build more VBA functionality within itself. If I password-lock the VBA then the end-user cannot build their macros or extra VBA functionality. – user2979010 Jul 20 '14 at 09:22