View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Disable spreadsheet when copied to incorrect file path or differen ip address

Schatzi wrote :
I have password protected the worksheets and VB code and disabled the
saving function. Still, the program can be copied and pasted to
another location. Is there a way to implement a macro that will disble
the spread sheet if is in an incorrect file location or an incorrect
IP address?


You can check 'ThisWorkbook.Path' on startup for the expected string
value and if not correct then 'ThisWorkbook.Close'!

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc