PDA

View Full Version : Count down timer help



Woodrow
03-22-2017, 03:34 PM
I have created a fairly complicated excel workbook that our company uses to price their jobs. (I can be more specific if needed). The problem I am running into is: As employees leave or get fired, they are stealing a copy of the workbook and using their stolen copy to compete against us.
So what I am trying to do or figure out is: Is there a way to create some kind of code that after a certain number of days it needs to be reset, or some way that their stolen copy becomes useless? (I could work with a code that changes a cell value after a given number of days? Or any ideas?)
Basically something where a new code needs to be input every 180 days or the program becomes useless. Help!!

Logit
03-22-2017, 05:23 PM
It would depend on how knowledgeable they are with Excel and VBA.

Keep in mind that Excel is not inherently secure. Anyone with a modest understanding of VBA can circumvent your safety measures.

However, to answer your question : Yes, it is possible.

Woodrow
03-23-2017, 07:58 AM
How would I go about doing this? Is there a simple code?
I understand that its not foolproof, I just want to lock it down as much as I can.

Logit
03-23-2017, 08:29 AM
Are you comfortable with deleting the workbook after a certain date ?

In other words, if the code is not altered prior to the deadline date - the workbook will be destroyed / deleted / no longer exist.
Would this interfere with employees who continue to be employed by your organization ? Can you edit the 'kill date' in their workbooks
prior to the workbook being eliminated so they don't lose their data ?

Are there backups to everyone's workbooks - can you recover the latest info if their workbook is not reset prior to the 'kill' date ?

Woodrow
03-23-2017, 08:53 AM
I would be more comfortable with just simply changing the value in a given cell (hidden) in the workbook unless the code is altered before the "Kill Date".
I can configure some of the code to refer to this cell so the workbook just simply doesnt work anymore. ( there are several sets of code that make the workbook sort and add up the values in columns and price out the job) Then the information would still be there, it just wouldnt work properly. This way any old information could still be retrieved by entering the correct "code" or entering the correct value in the before mentioned cell.

I dont want to delete it or destroy it because every time a sale is made, we keep a copy of the workbook with the customers information in it. We have thousands of "Contract Workbooks" in storage that we need to access in the future.

Logit
03-23-2017, 09:11 AM
Ok. Understood.

I need a sample of the worksheet you are speaking of. Don't include any confidential information.

Indicate which cell/s you are referring to and what you mean by changing the value therein. Provide an pseudo example.
This information will reduce the exchanges between us ... so we aren't guessing each other.

Thanks.

winon
03-26-2017, 11:53 AM
Hello Woodrow,

To add to what Logit stated:
It would depend on how knowledgeable they are with Excel and VBA.

Keep in mind that Excel is not inherently secure. Anyone with a modest understanding of VBA can circumvent your safety measures.

However, to answer your question : Yes, it is possible.

For starters, protect your VBA Project. You may also want to consider making sheets, barring one, very Hidden, until all requirements to open the Workbook are met.

Furthermore, I would suggest you enter the Code below in ThisWorkbook Event Code:


Option Explicit
Public Function GetFolderPath() As String

GetFolderPath = ThisWorkbook.Path & "/" & ThisWorkbook.Name

End Function
Private Sub Workbook_Open()

Application.DefaultFilePath = "D:/CheckPath.xlsm" 'change to suit

If Not GetFolderPath = "D:/CheckPath.xlsm" Then 'change to suit
MsgBox "Please restore this WorkBook to its correct Directory/Path", vbOKOnly, ("Access Denied")
ThisWorkbook.Saved = True
ThisWorkbook.Close
End If

End Sub



Regards.