Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word - how to lock text fields to prevent changes?

Status
Not open for further replies.

parkerbrown

Instructor
Jan 6, 2005
78
0
0
AU
Hi,

I'm working on some templates, and I wish to prevent others from modifying certain teext boxes on my spread.

Is ther some feature that will allow me to "lock" a text box - thus preventing modification?

Thanks!
 
Hi parkerbrown,

A textbox is designed for input. Why do you want to create, and then prevent input into, a textbox?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Parker,

Are these definitely text boxes? Tony is right, these are designed for input. Perhaps if you are looking to put text in somewhere and have it unchangeable you'd be better using FormFields and then protecting them.

Cheers,
Dave

Probably the only Test Analyst Manager on Tek-Tips...therefore whatever it was that went wrong, I'm to blame...

animadverto vos in Abyssus!

Take a look at Forum1393!
 
Hi TonyJollans, and DPlank,

the graphic item from the drawing toolbar that contains text is also called a Text Box, and isn't designed for input. You can right click this Text Box, choose Format, and under Protection you can choose to protect the object ( in fact this is the default ), then doing Tools/Protection/Protect Sheet will protect the Text Box.

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Good point Glenn - I was forgetting that one [smile]

Why does Word have three different things all called the same?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Actually, there are FOUR. There are ActiveX textboxes as well.

technically, the "textbox" Glenn refers to, IMHO, while called a textbox, is not really. It is a graphical object. It is child object of the Shapes collection, but is a CanvasShape. Canvas because it IS graphical.

There is an AddTextBox method, but it can produce either a CanvasShape textbox, OR a Shapes textbox.

So....four:

CanvasShape textbox
Shape textbox
FormField textbox
ActiveX textbox.

All called textboxes. Which is why, in these threads I am so darn fussy about terms, asking what KIND of textbox when people use the term.

However, Tony's question is still valid. This is a design element. What is the design here? If the user is NOT putting input then why is there an object at all with text. Why not just have text? Generally speaking, again IMHO, textboxes should be for input. Otherwise, even when the contents are inserted by code, other objects ("other "textboxes") are a better choice.

If the text in this location is changeable, is data from a source, then there are certainly other ways to insert such text into a document. Bookmarks for one.

The original question was regarding locking portions of a document. Bottom line to that subject is that it is completely irrelevant if it is a textbox or not.

You lock portions of a document by putting the portion within its own section, then protecting that section for forms. Tools > Protect document. Protected sections do NOT have to contain formfields. Protecting for forms simply disables ALL edit and format changes within that section.

Perhaps if you precisely clarified your intentions we can suggest a good solution.

N.B. on UserForms textboxes should NEVER be used for anything other than user input. There is absolutely no point. If you are displaying text on a userform, even text derevied from other sources, or by logic, it should be a Label.

Gerry
See my Paintings and Sculpture
 
OK, thanks for your tips.

To Clarify, I want to create a template (for a memo) which has the words "to: from: , re: , message:, " etc. on the left,

like this......

to:

from:

re:

date:


....and a text box to the right of each those words - for entering the the info re: to, from, message etc.

The thing is, I don't want somebody accidentally changing the "to: re: etc" by accidentally typing in those text boxes, but they must be able to type in the text boxes on the right.
 
FormFields are designed for exactly this purpose.

1. Type in your text, followed by a FormField.

To: FormField
From: FormField

2. Protect your document for Forms.

Now the ONLY thing the user can do is type into the formfields.

See my FAQ on FormFields. faq68-5299

Gerry
sorry...my art web site is down
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top