Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling File Distribution and Copying 1

Status
Not open for further replies.

d23

Petroleum
Dec 8, 2002
297
All,

Is there a way to read the MS EXCEL Product ID number into a file. If I can read the ID number I can use it to limit use of a file to only computers I approve.

I have to distribute some files I wrote and need to prevent the files from being copied to other machines. If there is a better way please let me know.

Thanks
 
Replies continue below

Recommended for you

You may also look at some sort of DRM software.
Another option is to password lock the excel file.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
 
It depends on how secure you want it to be & also how much do the people you send it to know about VBA.

Various options include:
1 - When file opens look on the network for a particular file (that way if you're not on the network it will close the file)
2 - In VBA look at Application - there are various possibilities (e.g. Application.UserName, Application.ProductCode)

Either way never rely on Excel Password Protection (go to the Microsoft website, it is only for protecting the format)
 
kris44

The product code works. Now I do a start-up if statement where if the product code = cell A1 the sheet opens if not the file will close. I just have to put the users product code in a cell.

If they disable macros on start-up I may still have a problem :).

No protection is absolute.

Thanks for your help!

D23
 
D23,
The video uses a method I used before (i.e. use the VeryHidden function). This can still be overcome by someone disabling macros in your workbook, then running a simple macro in another workbook which turns all sheets to Visible.

Another possibilty is User Defined Fuctions - these don't work when Macros are disabled so the worksheet is useless. This generally requires you do more work

As I said in my original post it all depends on what excel knowledge the people you are sending it to have
 
kris44

The video was good. I have office 2000 on my personal computer and 2007 on my company machine. I tried the “VeryHidden” statement in 2000 and it did not work as expected. It did hide the sheet, but I simply went to the Format > Unhide and opened the sheet. It may work in 2007. I will try it when I get some time.

I still plan to use the “if” statement to check if the “Product ID” has been approved if not it will close EXCEL, but the VeryHidden will add a little more security.

The sad fact is that no amount of protection is absolute. Once a file leaves my computer I can’t control it. In this case I have 5 meg worth of design software that will sooner or later be broken and become public.

Thanks for your help!

D23
 
If this is a product, you might consider shipping some sort of USB dongle with it ;-)

Ebay's current pricing for USB Bluetooth dongles is running between $1 to $2 in single quantities. All you would need to do is to ensure that the dongle with a matching hardware ID is attached to the machine.

Otherwise, you might consider compiling the VBA code using VB express, or something similar, and encapsulating the validity check in the compiled code to make it harder to crack.

TTFN

FAQ731-376
 
This general subject has been canvassed before (surprise, surprise). See, for example, thread770-171136 from about three years ago.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor