+ Reply to Thread
Results 1 to 10 of 10

Protecting excel software with VBA

  1. #1
    Registered User
    Join Date
    03-22-2013
    Location
    Turkey
    MS-Off Ver
    Excel 2010
    Posts
    6

    Protecting excel software with VBA

    I made a nutrition tracking software with excel and i would like to sell it through my website. However in this way its too easy to distribute, anyone can buy one and send it to his friends.

    What i want is such a system, if possible:

    1) When the user first runs the excel file, excell will look upon his registry and tell his CPUID in featureset.

    2) And then i will give him confirmation code in accordance with his cpuid (created by a logarhytm)

    3) All the cells will be password protected from being clicked or viewed..

    4) No other macro can be run within the excel and if someone disables the main macro the program will immediately terminate itself by deleting all the information

    5) Since the program will run according to his unique cpuid confirmation code, he wont be able to send it to anyone else.

    Is this possible to make?

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Protecting excel software with VBA

    It's all possible apart from step 4.

    You can't make excel secure enough for this sort of thing, someone with knowledge would be able to bypass your security fairly easily. If you want to sell your software through your website my suggestion would be to make it with another development tool, for example, visual studio.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,422

    Re: Protecting excel software with VBA

    Yes, it's possible to get details about the system. See the example code below obtained from another forum (who I clearly cannot name) BUT if you Google "excel vba get cpu id", it's top of the list.

    However, you're probably wasting your time. Excel is not a secure environment and passwords are easily cracked and/or removed ... which we cannot discuss here. If you do attempt to do it, you will have to ensure that the workbook is virtually unusable unless macros are enabled. And, realistically, that's not as easy as it sounds (if it sounds easy).

    However, the code:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    03-22-2013
    Location
    Turkey
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Protecting excel software with VBA

    Thanks for answers, yudlugar and TMShucks...

    I need to know Visual Basic language to use Visual Studio right? Is there a way to combine excel with the Visual Studio?

  5. #5
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Protecting excel software with VBA

    Visual studio can develop C+/C#/VB etc. You can combine excel with visual studio but I'm not sure that would be any more secure.

    For what it's worth, I could be wrong but I believe that you can change the CPUID that TMShucks' code would find.. I normally tie things to the MAC address and use code like this to compare the system mac address to a certain mac address, that, for example, I could store in a license file:
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-22-2013
    Location
    Turkey
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Protecting excel software with VBA

    Thanks a lot.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,422

    Re: Protecting excel software with VBA

    @yudlugar: for what it's worth, it's not my code ... I just "found it" and tweaked it a little

    I like the idea of using the MAC address. Forgive my naivety, but, does that come from the machine itself or from the network card? And, if there is more than one network card, what do you get back? And how do you call that function? What parameter do you pass to it?

    Still don't think it's worth the effort. If you want to protect your Intellectual Property Rights, you really need a third party tool to secure the workbook. But you're then into licensing the third party tool.


    Regards, TMS

  8. #8
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Protecting excel software with VBA

    It comes from the network card. I believe you cannot change a MAC address as it needs a unique identifier to connect to a network.

    This bit:
    Please Login or Register  to view this content.
    Loops through all of the network cards and checks the mac address of each one. So if the mac address you are looking for (the arguement for the function) exists, the function returns the mac address, otherwise it returns "".

    I agree to an extent, although I think that a degree of protection can put a lot of people off, hence why I use these sorts of codes in my templates for say, distributing round the office. It stops people in other departments getting access etc.

    For protecting a commercial software from being "cracked" though, they are useless.

    Note: you can go to command prompt and type ipconfig/all to get all the mac addresses that exist on a system, you will notice there are a few that are 00:00:00:00:00

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,422

    Re: Protecting excel software with VBA

    Ah, so you give it the MAC address to check if it's the right one. OK. Thanks.

  10. #10
    Registered User
    Join Date
    04-03-2014
    Location
    lima, peru
    MS-Off Ver
    Excel 2010 / 2013
    Posts
    7

    Re: Protecting excel software with VBA

    Hi Floriante,

    You might be interested in checking out a product called Excel Compiler (http://doneex.com/), which allows you to compile your spreadsheet into an EXE. It compiles any VBA code into native code, so people would have a hard time reverse engineering it. When users run the EXE it launches your excel spreadsheet, and allows you to have a splash screen with your logo and company/product information. It also hides all of the formulas in the cells, and stops people from being able to edit them. It also allows you to license the software to specific users so that they can only run your spreadsheet if you have given them a machine specific license, that you generate from your computer. It's a pretty cheap program, maybe $100-300 or so. The one drawback is that this program only works if your spreadsheet is quite simple and doesn't have any external links or third-party references etc.

    I also created a tool called HiveLink that let's you share your spreadsheet as a service. You basically create a lightweight spreadsheet that has your inputs and outputs interface still intact, but you remove all of the sensitive data, macros, and calculations. You can invite users to download this lightweight spreadsheet, and then when they run it HiveLink connects the inputs from the user's spreadsheet to your original spreadsheet running on your own computer. Then it runs your macros and extracts the output results and sends them back to the user and puts them in the same place in their lightweight spreadsheet. HiveLink gives you a website where you can manage your user invitations and revoke access to anyone at any time, and also to put marketing information about your spreadsheet on there. You could get users to pay you via PayPal or some other service and then grant them access upon payment.

    You can learn more about HiveLink here:
    https://hivelink.io

    And another more extensive post I wrote about it here:
    http://stackoverflow.com/questions/1...68867#28968867

    Good luck!
    Stu

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. What's the best RS-232 software for Excel?
    By jrdnoland in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-30-2009, 09:08 PM
  2. [SOLVED] Convert from Excel to Software ?
    By David in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-15-2006, 10:10 AM
  3. Replies: 0
    Last Post: 07-26-2006, 06:55 PM
  4. Add-on software for Excel charts?
    By Ed in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-10-2005, 01:20 PM
  5. [SOLVED] How can I get the excel software only?
    By Marta in forum Excel General
    Replies: 1
    Last Post: 07-04-2005, 02:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1