Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to make add-in work for all users | Excel Programming | |||
simultaneously work in a work book with other users | Excel Discussion (Misc queries) | |||
How can I turn of zooming so that users can't change size of work. | Excel Discussion (Misc queries) | |||
How can I prevent users from deleting an Excel toolbar from a work | Excel Programming | |||
How to promt users to save their work? | Excel Programming |