From: tikouka on
Try this please:
1. Create new doc as a dotm (macro enabled template)
2. From the Developer tab, Insert a ActiveX textbox control
3. Create a TextBox1.change routine, and apply some simple code – just
MsgBox TextBox1 will suffice
4. Turn on Protect Document with editing restrictions Filling in Forms
5. Switch off Design Mode and test an entry in the text box
Works fine.
6. Now close and save the dotm
7. Double-click the dotm from explorer (opens a document based on the
template)
8. Take the Option (in toolbar) to allow active content
9. Try the textbox entry
Can't enter
10. Take protection off then switch it on again
11. Try the textbox entry
Works fine
This can't be right surely?
I need to provide a template so that users can create their own docs from it
(as you normally do). I can't use Forms, as I have a gigantic table within
which I want to create my own totals using VBA to total text box values. It
worked a charm while developing the Template, but I was staggered then to
discover that it doesn't work with a document created from the template
(unless of course you do that stupid workaround off/on of protection as in
step 10 above).
Originally, the form was created with the table linked to an Excel, but that
isn't an option if you want the form protected, as it doesn't count as an
entry field. Perhaps there is a way around that. If so, please tell me.