Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: Locking files to the office

  1. #1

    Locking files to the office



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I am by no means an expert at programming excel or macros, but I have tooled my way through some issues that I was able to solve with some creative macros. However, my problem now is that I have found out that the file i have created have been leaked to other companies in my industry and they are using them without permission. I am wondering if there is a way to lock an excel file to only open if it is connected to my work network. I have figured out a way to use the Auto_Open macro with some help from Ken's post of FileFolderExist (Kudos to Ken) to verify the existence of a file on the network before opening, and at the same point, it will close excel if it does not find that file. The problem I am running into is the work-around by pressing Shift while opening the file through the excel program, thus bypassing my verification process, and allowing them to view/etc the excel file that I have spent countless hours creating and updating. I would just put a password on the file to open, but apparently the previous password had been leaked as well, so I am looking for something that I can control. Is there a feature that I am missing that would be able to accomplish this? BTW, this would have to be compatible with Excel 2002 and up, since some of my computers are running that version still.

    I appreciate any help or input on this.

    Thank you,
    John

  2. #2
    Super Moderator JeffreyWeir's Avatar
    Join Date
    Mar 2011
    Location
    New Zealand
    Posts
    357
    Articles
    0
    Excel is not secure. Passwords can be cracked with a very simple macro...all the user needs to do is access the VBA window of the file and cut some code in and run it. See <link removed>

    And if you try to password-protect the VBA project so that they don't get access to the VBA window (and so they can't paste the code in), then they can remove the VBA password very easily just by opening the file in a hex editor such as Notepad Plus and making a quick one-second tweak. See <link removed>

    So bottom line, unless you somehow encrypt your file with some kind of proper encryption tool (and I'm guessing such a tool exists) then you're out of luck.
    Last edited by Ken Puls; 2013-06-05 at 04:14 PM. Reason: Removed links to sites demonstrating hacking/cracking Excel files

  3. #3
    Conjurer royUK's Avatar
    Join Date
    Mar 2011
    Location
    Derbyshire, UK
    Posts
    155
    Articles
    0
    Excel Version
    most versions
    It doesn't help security when someone posts links to ways of cracking passwords!

    There are methods of locking files to work on a specific computer, obfuscating the code. All help but are not 100% secure.
    Hope that helps

    Roy

  4. #4
    Super Moderator JeffreyWeir's Avatar
    Join Date
    Mar 2011
    Location
    New Zealand
    Posts
    357
    Articles
    0
    With respect, I beg to differ. It absolutely does help security of information when someone points out to users that the platform itself cannot be secured. Because then at least users are under no illusions otherwise.

  5. #5
    Conjurer royUK's Avatar
    Join Date
    Mar 2011
    Location
    Derbyshire, UK
    Posts
    155
    Articles
    0
    Excel Version
    most versions
    I wasn't disagreeing about the Excel, but that it doesn't help security when someone posts links to ways of cracking passwords! Most other Forums do not allow such links.

    There are ways but it usually involves software such as Donex
    Hope that helps

    Roy

  6. #6
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,268
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    Quote Originally Posted by JeffreyWeir View Post
    With respect, I beg to differ. It absolutely does help security of information when someone points out to users that the platform itself cannot be secured. Because then at least users are under no illusions otherwise.
    Hey Jeff,

    I replaced your links with some non-linked text. I totally agree that users need to know, and even demonstrate removing worksheet passwords via VBA when I teach classes, but I don't really like providing the code or links to it. I think with the edited post in place though, the point has definitely been made. This should make sure that future readers will know it can be done, but will be on their own to dig up the techniques elsewhere.

    Also, just as an FYI, that hex editor method stopped working with the release of Vista, iirc. There's something about the OS or the file version (or both) that changed the structure there. Having said that, you can still buy a cheap solution to remove VBA or Workbook Open passwords... if you trust your credit card to someone who professes to make a living by hacking.

    Quote Originally Posted by misterjeeves
    Is there a feature that I am missing that would be able to accomplish this?
    Unfortunately the only tool I'm aware of to really "harden" the security of your solution is Visual Studio. As the gents in this thread have already pointed out, Excel is completely unsecure. With Visual Studio (coding your solution in a .NET language) you can obfuscate and compile your code in ways that make it much more difficult to steal. Having said that, where there is a will there is always a way, so even that is not 100% safe, although it's probably 99% safer than Excel.
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  7. #7
    Super Moderator JoePublic's Avatar
    Join Date
    Sep 2011
    Location
    Askew
    Posts
    183
    Articles
    0
    Excel Version
    2010
    Quote Originally Posted by Ken Puls View Post
    Also, just as an FYI, that hex editor method stopped working with the release of Vista, iirc. There's something about the OS or the file version (or both) that changed the structure there.
    Nope. Still works.
    Circumference of a circle = 2πrē



    ēthe circle's radius

  8. #8
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,268
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    Might have been the method I was using then. The article linked to had very slightly different steps.
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  9. #9
    Super Moderator JoePublic's Avatar
    Join Date
    Sep 2011
    Location
    Askew
    Posts
    183
    Articles
    0
    Excel Version
    2010
    I didn't see the link so can't comment
    Circumference of a circle = 2πrē



    ēthe circle's radius

  10. #10
    Super Moderator JeffreyWeir's Avatar
    Join Date
    Mar 2011
    Location
    New Zealand
    Posts
    357
    Articles
    0
    Explain to me why it doesn't help security of information to point out that the app isn't secure by referring to easily found resources proving that it isn't secure?

    Would it have been acceptable if I had said "Do a Google search on 'break Excel password' to see what I mean"? If so, isn't the difference between that and this somewhat arbitrary?

Page 1 of 2 1 2 LastLast

Posting Permissions

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