Protected form + InsertPicture

G

Guest

GoodDay,

I've created a protected form. I'd like 1 field to be an "insert image
here" type thing. But once the form is protected.. you can no longer insert
an image. I've tried using an InsertImage macro to no avial. Any Ideas? It
is necessary that I prevent users from altering this form but they must be
able to insert a picture. Any help would be greatly appreciated.

Thanks.
Richard
 
J

Jay Freedman

GoodDay,

I've created a protected form. I'd like 1 field to be an "insert image
here" type thing. But once the form is protected.. you can no longer insert
an image. I've tried using an InsertImage macro to no avial. Any Ideas? It
is necessary that I prevent users from altering this form but they must be
able to insert a picture. Any help would be greatly appreciated.

Thanks.
Richard

Download the Form_picture tutorial template from
http://jay-freedman.info and look at the system of macrobuttons,
bookmarks, and macros that make it work. Write to me if you have any
questions about how to apply it to your form.
 
G

Guest

Mr. Freedman, you don't know how much I appreciate you creating this
masterpiece of a document that allows inserting a picture while the other
sections of the document are protected against being altered. I see that the
document has to be protected, unprotected and then protected again. That
means there can't be any password applied when specifying protecting the
forms. Is it possible for you to modify your document somewhat so that a
specific password can be applied to the document and still have the insert
picture feature work? The reason I am asking is because I don't want my
users to "inadvertently" unprotect the entire document. Thank you.
 
H

hennie

Richard said:
*GoodDay,
To be able to insert an image in a protected form will require that
you create one or more continuous section breaks. The idea for the
continuous section break is to unprotect that section where you want
the image to be inserted and leave the other protected.

Hennie

I've created a protected form. I'd like 1 field to be an "insert
image
here" type thing. But once the form is protected.. you can no longer
insert
an image. I've tried using an InsertImage macro to no avial. Any
Ideas? It
is necessary that I prevent users from altering this form but they
must be
able to insert a picture. Any help would be greatly appreciated.

Thanks.
Richard *
 
J

Jay Freedman

Hi Leonard,

If you downloaded the template before this past Sunday, go get a copy of the
latest version. Then look at the code in the VBA editor. Among other things,
I've included the password parameter as a comment in each .Protect and
..Unprotect statement. To use it, remove the single quote that makes it a
comment and put your password between the quotes. (Hmm, now that I think of
it, the password should be a string variable that's used in each of those
places. Give me until tomorrow to do that, because I can't modify the web
site from here.)

If you're worried about users opening the code to see the password, you can
password-protect the code itself. To do this, in the VBA editor, go to Tools
Project Properties > Protection. Check the "Lock project" box and enter
the password twice (this can be the same as or different from the password
for the form). Be sure to keep a record of the password or, better, keep a
copy of the template without a code password -- if your only copy is
protected and you lose the password, you're sunk.

However, a user prying into the code to find the form password is more than
just "inadvertent", so maybe you can dispense with the added hassle.
 
G

Guest

Mr. Jay Freedman, you're a genius!

OK, I just downloaded your latest Form_Picture.dot and I pressed Alt+F11 and
then replaced all occurrences of "MyPassword" with my own password within the
quotes. I then protected the VBA project module against being viewed and
modified. Finally, I password protected the template for forms with my own
password. It worked! No users can now intentionally try to unprotect the
template. Thanks so very much!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top