TextBox control not enabled with protection on

T

tikouka

This has weird behavior, so I am sure it is a bug.

I am trying to auto-total table columns in a document template (not a VBA
form). The fields are ActiveX textboxes and in VBA I simply assign them to
integers and total; ie effectively adding the values in TextBox1, Textbox2
etc to total in TextBox9.

Then I assign the "Filling in forms" protection to the document.

It works fine and dandy in the template (dotm) that I am creating, but it
all goes wrong when I create a docm from it (which is of course what I want
the users to do).

When you open up a document from the template (setting the Option to allow
content), the non-enterable stuff is protected OK, but the textbox fields
appear like they are editable; that is, they have expansion handles around
the edges. But they are not enterable.

Now here's the really odd part. If I take off the protection and then
immediately apply it again, all is well - the textboxes are enterable (the
handles disappear) and the totalling works fine.

Of course, there is no way I can instruct the users to do this, otherwise
what is the point of making the document protected in the first place.

Note that I have populated ActiveX ComboBoxes successfully with VBA in
another protected document, so I can't think it is a compatibility problem.
 
F

Fumei2 via OfficeKB.com

If the handles are visible this suggests you are in Design mode. I do not
know about 2007, but it may be the same as 2003.

ActiveDocument.ToggleFormsDesign
 

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