×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

how to protect file from being copied?

how to protect file from being copied?

how to protect file from being copied?

(OP)
Hi All,

Here is my problem, I have a few macros and I cannot put an expiration date on them.
I want prevent macros to be unauthorised copied and used.
The way I do it on excel is simple:

If ThisWorkbook.Fullname  <> ' my path' Then Exit Sub

So nobody is able to execute a copy of a spreadsheet from folder than this where a macro file is stored.

Does anybody know how to get around this in attachmate, what would be a ThisWorkbook thing in Extra Basic?

regards
Sagit

RE: how to protect file from being copied?



Sagit,

Anyone who is at all VB savy, can get around your trap, by opening the workbook while disabeling macros, unless you've done some other fancy coding.

To my knowledge, Extra VB has no such events.  In fact, Extra VB is much more elemental than Excel VBA.

You'd probably need a VB executable that would run your Extra application A to Z.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: how to protect file from being copied?

Skip,

The reason for trap is very simple. I do a macros for a group of an users. Macros are stored in some shared locations. Users often copy macros to their personal storage locations. Any time I have a new, updated and free from bugs version, I save it to shared location. Date protection ensured me that old copies sooner or later will expired and users will not be able to use it.

There are some reasons I cannot use date expiration trap anymore. So I set up so call 'trap' as described in post. Ordinary user will not have a clue how to get around that trap, advanced user will understand reasons and will not use old copies.

Does it make any sense?

Maybe you have some other ideas how to get around this (hope).

Regards,
Sagit

RE: how to protect file from being copied?

As a thought, you could put a "check file" containing the current version number in the shared storage location then do something like

  dim ver
  Open [checkfile] for input as #1
    lineinput #1,ver
  close #1
  if ver<> [current version number] then
    msgbox "wrong version"
    goto [end of macro]
  end if

Every time you change the macro, you increment the version number in the check file. Then it doesn't matter if people copy the macro, it will work until you update it.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close