Cable Forum

Cable Forum (https://www.cableforum.uk/board/index.php)
-   General IT Discussion (https://www.cableforum.uk/board/forumdisplay.php?f=19)
-   -   Excel and VBA, how to protect? (https://www.cableforum.uk/board/showthread.php?t=29094)

Strzelecki 23-05-2005 12:25

Excel and VBA, how to protect?
 
The company my Dad works for have had some stuff done in Excel which includes macros and VB code that has been written by them. The macros are password protected so people can't steal them (supposedly) but now they want to give the program out to a few customers. They've asked me if it's possible to give a good level of protection to their program and also if the program can have a usage timeout (stops working after 30 days) that can be set by them before they give it to the customer. I don't know why they've done it in Excel as the security in there is always crackable and they don't have time to let me rewrite the whole thing in VB or something. They will be giving the program to customers on CD. Anyone have any ideas? I've looked at the standard workbook passwords and VB password stuff and also creating a dll but it doean't seem very good. As for the CD protection timeout that probably can be done but with 3rd party software.

Richard M 23-05-2005 13:09

Re: Excel and VBA, how to protect?
 
The problem here is that VB script is always uncompiled so anyone can view the source.
You could do something like:
Quote:

Dim StopWorking
StopWorking = "01/06/2005"
Dated = Datetime.Now()
If StopWorking <= Dated Then
Response.Write "Trial Expired!"
End If
Or something like that anyway (VB skills are not that good) but even then you'd still be able to look at the code and change the date.

Raistlin 23-05-2005 14:59

Re: Excel and VBA, how to protect?
 
You could look at the Autoexec automation for Excel.

You can include a module called (I think) Autoexec in the VBA for the worksheet. This runs as soon as the worksheet opens. Then use the code above (or an approximation of it to suit your needs) to test the date. If the date is out of the allowed bounds you simply close the sheet.

Hopefully your clients won't necessarily be able to bypass this very easily.

Strzelecki 23-05-2005 20:09

Re: Excel and VBA, how to protect?
 
Ah thanks for the suggestions so far, sorry I didn't reply sooner, had to go to work! Just had it emailed to me, 14 worksheets and 31 Macros so I don't think this is a quick job. I'll try autoexec first though!

Raistlin 23-05-2005 20:56

Re: Excel and VBA, how to protect?
 
What do these spreadsheets do?


All times are GMT. The time now is 23:46.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum