I'm fairly certain that Microsoft can! I vaguely
remember a recent case were a hacker was caught
because a Word document was traced back to him.
Distributing workbooks with a hidden serialization
under the guise that they're offical class templates.
But I'm still not clear how you'd guard against
Copy/Paste.
Here's a suggested solution. Microsoft applications have a UserName property that most people type their name into the first time they open and Office product. In VBA you can access it as
Application.UserName
I suggest you write this username to a cell on a hidden worksheet (and I recommend you make it xlVeryHidden so it doesn't show up in the VBE project pane). Do this in the Workbook_Open event, and if the cell already has a name in it, write the username to the next cell. That way, when you get the workbook you can look at the hidden sheet and see a list of the names of every user that has opened the workbook.
You can guard against users failing to register their username by forcing them to enter their name if the username field is empty.
You could also make this a little more foolproof by prompting each student for a unique student ID instead of checking the application username. Your code would then write this ID to the hidden sheet. This is a little more secure because, presumably, students do not know each other's IDs.
Damon
PS. Don't forget to password protect your VBA code.
Damon -- It seems it's always "Admin" at my school. Default set up I guess.
Aladin
Hi Aladin,
Yes, you're right. I think a default name will be the case for most school and corporate installations. Using the UserName will probably only work if the students are using their personal computers for the work. In the case of a default UserName, prompting for a student ID or a password unique to each student will be necessary.
Damon
Could you somebody tell me, how to bring information about document properties to the sheet (name of the document, author, directory, etc.). I know where to find it (File/Properties). In MS Word it is possible to use the function Inset field (Insert/field
). But there is no such a function in MS Excel. I know this problem can be solved by using a macro instruction, but the document I am working on must be macroless (without any macros). Is there any way, how to do it?
Thank you very much.
Tomas