Protect excel files to open only on designated computers

mikeydo

New Member
Joined
Nov 12, 2010
Messages
39
Hi, to try and stop copying and using my files I wondered if there is a way to protect my excel files to open only on a designated computers. doesnt really matter if they are copied but they wont be able to use it as it would be assigned to another computer name.

Thanks

Mike
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Technically this could be done. Because of Excel's less than robust security, you might find some who can get around the protection.

You will need to write a macro that runs when the workbook is opened. This macro will need to test the machine name against some table of acceptable machine names. If the machine name is in the table then the rest of the macro will run; otherwise, the macro will force Excel to close.

That is a very simple analysis of what to do. Since it is a macro, the user will need to have Macro execution enabled. You will need to test for macro execution enabled and handle the case where it is not. You can find posts that discuss this issue and handle it properly.

You will need password-protect the VBA Project code to keep a user from messing with it.

Then, you will need to have some process to keep the machine name table updated.

Now, if you are in a network you may be able to configure the "Sharing and Security" settings on the actual file to limit who can read and write the file, but that will be user based, not machine based.

What you ask is doable (after a fashion) but will probably be more trouble that it is worth.
 
Upvote 0
Thanks vw412, Thats great news but I cant write any vba, do you have any idea how this can be written?

Mike
 
Upvote 0
I would suggest you read the information at this web site:

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

and try to understand the VBA code that is there. It will provide you with most of the functionality you need.

Once this works for you and you understand how it works, you (or someone) could add the code to test for machine name in a table. I might suggest that you have a separate worksheet that contains the machine name table that is kept very hidden except when you need to modify it.

Try out the code at this web site and come back to ask questions. I will attempt to help you understand it and use it.
 
Upvote 0

Forum statistics

Threads
1,207,424
Messages
6,078,448
Members
446,339
Latest member
keogata

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top