Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default 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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default 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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default 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?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default 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?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default 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?

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default 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.
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make add-in work for all users A.Q[_2_] Excel Programming 2 December 23rd 05 11:29 PM
simultaneously work in a work book with other users Sweets Excel Discussion (Misc queries) 1 April 18th 05 07:35 PM
How can I turn of zooming so that users can't change size of work. cwwolfdog Excel Discussion (Misc queries) 2 February 10th 05 02:53 PM
How can I prevent users from deleting an Excel toolbar from a work BillBreck Excel Programming 1 December 10th 04 04:08 AM
How to promt users to save their work? shirley Excel Programming 1 March 2nd 04 02:43 AM


All times are GMT +1. The time now is 11:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"