I used:
Sub proVerifyPathName()
'display message box with pathname for verification,then use
PathName below
'MsgBox "Path: " & ActiveWorkbook.Path & _
'Chr(13) & "Name: " & ActiveWorkbook.Name & _
'Chr(13) & "FullName: " & ActiveWorkbook.FullName
'after using above, use displayed pathname to verify
authenticity of file
If (ActiveWorkbook.FullName <> "P:\user name\VancoKinetics8.xls")
Then
MsgBox "Warning, " & Application.UserName & vbCrLf & _
"Unauthorized copies of this program file are not allowed."
& _
Chr(13) & "We will hunt you down!", vbOKOnly +
vbCritical, "Unauthorized Copy"
ActiveWorkbook.Close False
End If
End Sub
First uncomment the three lines (MsgBox, Chr(13), Chr(13)) to get
your pathname. Then recomment them so they don't keep popping up,
and change the P:\user name\VancoKinetics8.xls to whatever your
pathname is. This only allows it to be run from the designated drive
& folder.