+ Reply to Thread
Results 1 to 2 of 2

Locking a spreadsheet to one PC

Hybrid View

  1. #1
    Registered User
    Join Date
    09-07-2009
    Location
    Lytham, England
    MS-Off Ver
    Excel 2003+07
    Posts
    75

    Locking a spreadsheet to one PC

    Hello all,

    I've tried many different methods and can't seem to nail this one.

    Basically, I have a spreadsheet that is useful and would like people to download and use it. However I want to enable it so that once the spreadsheet has been download (and I supposed opened for the first time) that it can't be then be used on any other PCs other than the target one it has been sent to.

    I thought about using the "User" i.e. =GET.WORKSPACE(26) and putting it in a hidden cell the first time the excel spreadsheet was used and then seeing if this matched each additional time the spreadsheet was used. This however is very crude and could lead to a lot more potential problems I'd have thought.

    I don't know of anything else that the spreadsheet could use to identify the users pc uniquely. Was wandering if any of you guys have had this problem before or have any solutions?

    Many Thanks for your times
    Paul

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Locking a spreadsheet to one PC

    Good morning pdauction

    ...and welcome to the forum!!
    Quote Originally Posted by pdauction View Post
    This however is very crude and could lead to a lot more potential problems I'd have thought.
    This whole area is frought with "potential problems", I'm afraid.

    Excel is not a secure development platform, so any way that you use to achieve this can be circumvented by someone with the right knowledge - many of the frequent users of this forum would probably have enough knowledge to do this.

    You will also need something in place to somehow "force" users into letting macros run, as the whole thing will be driven fairly heavily by VBA.

    Have a look at the code here which looks at getting the serial number of a harddrive - you could use this as your unique identifier.

    An alternate way would be to write a flag to the registry on first opening (use the SetSetting and GetSetting instruction) to do this and check for it on subsequent openings.

    For both of the above to work there is going to need to be a counter involved which will increment every time the file is opened (and force a save to update it - whether the user likes it or not) so that the program knows whether or not this classes as "first use".

    As I said above, the whole thing is fraught with awkwardness - and whatever checks you put in can be worked around. Is it really worth it?

    Finally, I don't know if this can help you, but there is a discussion here about Information Rights Management in Excel.

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1