![]() |
worksheet that will only work on one users pc
I am trying to create a excel worksheet that will only work on one
users pc. Oh no, not that again! I have read much of the archives here.. I am not looking for something bullet proof. I just want to make it difficult for the average user to pass around worksheet copies. If I can key a macro to detect something that is unique in every users pc. Ideas? |
worksheet that will only work on one users pc
I want to read some unique system identifier such as a serial number.
I can then program macro to read that system number and closes the workbook if it is not present. Excel serial numbers stored in the registry are not in the same location depending on version. I did find a routine that returns the hard drive volume number. Not sure how unique that is. |
worksheet that will only work on one users pc
I want to read some unique system identifier such as a serial number.
I can then program macro to read that system number and closes the workbook if it is not present. Excel serial numbers stored in the registry are not in the same location depending on version. I did find a routine that returns the hard drive volume number. Not sure how unique that is. |
worksheet that will only work on one users pc
This works, but is far from bullet proof.
In the workbook press Alt + F11. Find your workbook in the project window, click on the little plus, right click "workbook" and "view code" In the main window at the top, change the left hand drop down box to say "Workbook" and the righthand one to say "Open" This will appear in the main window: Private Sub Workbook_Open() End Sub in the gap between Private... and End Sub paste the following: if not environ(5) = "MyComputerName" then activeworkbook.Close **Change "MyComputerName" to the name of the computer where this workbook is allowed to be used!** It's far from bullet proof, because if macros are disabled the code won't run. "Fan924" wrote: I am trying to create a excel worksheet that will only work on one users pc. Oh no, not that again! I have read much of the archives here.. I am not looking for something bullet proof. I just want to make it difficult for the average user to pass around worksheet copies. If I can key a macro to detect something that is unique in every users pc. Ideas? |
worksheet that will only work on one users pc
Apologies, that should say:
if not environ(5) = "COMPUTERNAME=MyComputerName" then ... "Sam Wilson" wrote: This works, but is far from bullet proof. In the workbook press Alt + F11. Find your workbook in the project window, click on the little plus, right click "workbook" and "view code" In the main window at the top, change the left hand drop down box to say "Workbook" and the righthand one to say "Open" This will appear in the main window: Private Sub Workbook_Open() End Sub in the gap between Private... and End Sub paste the following: if not environ(5) = "MyComputerName" then activeworkbook.Close **Change "MyComputerName" to the name of the computer where this workbook is allowed to be used!** It's far from bullet proof, because if macros are disabled the code won't run. "Fan924" wrote: I am trying to create a excel worksheet that will only work on one users pc. Oh no, not that again! I have read much of the archives here.. I am not looking for something bullet proof. I just want to make it difficult for the average user to pass around worksheet copies. If I can key a macro to detect something that is unique in every users pc. Ideas? |
worksheet that will only work on one users pc
why not make the workbook password protected and make sure that the user
knows the password? "Fan924" wrote in message ... I am trying to create a excel worksheet that will only work on one users pc. Oh no, not that again! I have read much of the archives here.. I am not looking for something bullet proof. I just want to make it difficult for the average user to pass around worksheet copies. If I can key a macro to detect something that is unique in every users pc. Ideas? |
worksheet that will only work on one users pc
It's far from bullet proof, because if macros are disabled the code won't run.
I found a macro that hides all sheets as the file closes. With macros disabled, all one would see is a cover sheet. I will look over your suggestion later today. Thanks why not make the workbook password protected and make sure that the user knows the password? There is nothing stopping a person from giving the workbook & password to 100 people. |
worksheet that will only work on one users pc
It's true that a person could pass the workbook and password to 100 people,
but if they were so inclined they could copy the sheets into a new workbook and circulate that. You're reliant on the designated user of the sheet understanding that they're in a priveleged position and not to share it. "Fan924" wrote: It's far from bullet proof, because if macros are disabled the code won't run. I found a macro that hides all sheets as the file closes. With macros disabled, all one would see is a cover sheet. I will look over your suggestion later today. Thanks why not make the workbook password protected and make sure that the user knows the password? There is nothing stopping a person from giving the workbook & password to 100 people. |
All times are GMT +1. The time now is 03:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com