469,626 Members | 1,045 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

Protect VB code by automation

Is it possible to set a password to protect the code of an Access VBA
project by automation (I already know how to to it manually)?

David.
Nov 13 '05 #1
4 2093
On 4 Oct 2004 02:39:07 -0700, la**********@yahoo.fr (David LACASSAGNE)
wrote:
Is it possible to set a password to protect the code of an Access VBA
project by automation (I already know how to to it manually)?

David.

Hi
I suspect no-one has answered this because its not clear what you mean
David

Nov 13 '05 #2
I develop an access database with forms and VBA modules.

When I deliver this database, I would like that the users cannot
access to the code of these forms and modules (to avoid accidental
modifications).

So, before making the delivery, I protect the code by setting a
password to the VB project (properties protection tab). I do this on a
copy of the .mdb file, so as each time I develop I do not have to
enter the password to make modifications.

This is a very simple task, but since I use a VBScript script that
performs some
other tasks necessary for the delivery, I would like to include this
task in the script.

Since we can access to the VB project by automation with code like:
Set db = GetObject("DB.mdb)
MsgBox db.VBE.ActiveVBProject.VBComponents(1).Name

I am wondering if I can perform this password protection of the VB
project by automation.

Hope it's clear.

David.

d.***************@blueyonder.co.uk (David Schofield) wrote in message news:<416317e7.1041876699@localhost>...
On 4 Oct 2004 02:39:07 -0700, la**********@yahoo.fr (David LACASSAGNE)
wrote:
Is it possible to set a password to protect the code of an Access VBA
project by automation (I already know how to to it manually)?

David.

Hi
I suspect no-one has answered this because its not clear what you mean
David

Nov 13 '05 #3
that's what MDEs are for... (or am I talking outta my ...?)
Nov 13 '05 #4
Pieter Linden wrote:
that's what MDEs are for... (or am I talking outta my ...?)


I'd agree but in some circumstances you may have designed an app where
it makes use of design features, e.g. building a form or report on the
fly, this would not be possible in an MDE. However, with a little
re-design...

--
Pretentious? Moi?
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Giganews | last post: by
11 posts views Thread by sweetpotatop | last post: by
22 posts views Thread by teejayem | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.