A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I lock a table cell in Word?



 
 
Thread Tools Display Modes
  #1  
Old June 15th, 2007, 05:13 PM posted to microsoft.public.word.tables
Kathryn Pundt
external usenet poster
 
Posts: 1
Default How do I lock a table cell in Word?

I am creating a template in Word using tables. I want to lock certain cells
so no one can alter the contents.
  #2  
Old June 16th, 2007, 10:28 AM posted to microsoft.public.word.tables
Cindy M.
external usenet poster
 
Posts: 2,428
Default How do I lock a table cell in Word?

Hi =?Utf-8?B?S2F0aHJ5biBQdW5kdA==?=,

I am creating a template in Word using tables. I want to lock certain cells
so no one can alter the contents.

Which version of Word do you have?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #3  
Old June 16th, 2007, 10:29 AM posted to microsoft.public.word.tables
alborg
external usenet poster
 
Posts: 74
Default How do I lock a table cell in Word?

Hi Kathryn:

Ok- this should do it for you...

1. Manual Method-

- right click on the textbox
- select Properties
- uncheck "Fill-in enabled"

2. Programmatic Method-
(in this example, you add 2 fields, each into a cell in your table, but
disabling the second field)

Dim rownum As Integer, i As Integer
response = MsgBox("Add new row?", vbQuestion + vbYesNo)
If response = vbYes Then
ActiveDocument.Unprotect
ActiveDocument.Tables(1).Rows.Add
rownum = ActiveDocument.Tables(1).Rows.Count

For i = 1 To ActiveDocument.Tables(1).Columns.Count
ActiveDocument.FormFields.Add Range:=ActiveDocument.Tables(1).Cell(rownum,
i).Range, Type:=wdFieldFormTextInput
Next i
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
ActiveDocument.Tables(1).Columns.Count - 1).Range.FormFields(1).EntryMacro =
"addinfo"
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).ExitMacro =
"addrow"
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).Enabled = False
'ActiveDocument.Tables(1).Cell(ActiveDocument.Tabl es(1).Rows.Count,
1).Range.FormFields(1).Select
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End If

Cheers,
Al

"Kathryn Pundt" wrote:

I am creating a template in Word using tables. I want to lock certain cells
so no one can alter the contents.

  #4  
Old June 16th, 2007, 02:12 PM posted to microsoft.public.word.tables
Kathryn Pundt[_2_]
external usenet poster
 
Posts: 39
Default How do I lock a table cell in Word?

Word 2003 (11...)

"Cindy M." wrote:

Hi =?Utf-8?B?S2F0aHJ5biBQdW5kdA==?=,

I am creating a template in Word using tables. I want to lock certain cells
so no one can alter the contents.

Which version of Word do you have?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)


  #5  
Old June 16th, 2007, 02:16 PM posted to microsoft.public.word.tables
Kathryn Pundt[_2_]
external usenet poster
 
Posts: 39
Default How do I lock a table cell in Word?

Tables (not textbox) doesn't appear to have the capability.
I am using Word 2003 (11....)

"alborg" wrote:

Hi Kathryn:

Ok- this should do it for you...

1. Manual Method-

- right click on the textbox
- select Properties
- uncheck "Fill-in enabled"

2. Programmatic Method-
(in this example, you add 2 fields, each into a cell in your table, but
disabling the second field)

Dim rownum As Integer, i As Integer
response = MsgBox("Add new row?", vbQuestion + vbYesNo)
If response = vbYes Then
ActiveDocument.Unprotect
ActiveDocument.Tables(1).Rows.Add
rownum = ActiveDocument.Tables(1).Rows.Count

For i = 1 To ActiveDocument.Tables(1).Columns.Count
ActiveDocument.FormFields.Add Range:=ActiveDocument.Tables(1).Cell(rownum,
i).Range, Type:=wdFieldFormTextInput
Next i
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
ActiveDocument.Tables(1).Columns.Count - 1).Range.FormFields(1).EntryMacro =
"addinfo"
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).ExitMacro =
"addrow"
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).Enabled = False
'ActiveDocument.Tables(1).Cell(ActiveDocument.Tabl es(1).Rows.Count,
1).Range.FormFields(1).Select
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End If

Cheers,
Al

"Kathryn Pundt" wrote:

I am creating a template in Word using tables. I want to lock certain cells
so no one can alter the contents.

  #6  
Old June 16th, 2007, 07:33 PM posted to microsoft.public.word.tables
alborg
external usenet poster
 
Posts: 74
Default How do I lock a table cell in Word?

I know- that's the whole point of locking the document, thus forcing the use
of textboxes. If you place a textbox inside a cell, you can lock THAT as
depicted!

Cheers,
Al

"Kathryn Pundt" wrote:

Tables (not textbox) doesn't appear to have the capability.
I am using Word 2003 (11....)

"alborg" wrote:

Hi Kathryn:

Ok- this should do it for you...

1. Manual Method-

- right click on the textbox
- select Properties
- uncheck "Fill-in enabled"

2. Programmatic Method-
(in this example, you add 2 fields, each into a cell in your table, but
disabling the second field)

Dim rownum As Integer, i As Integer
response = MsgBox("Add new row?", vbQuestion + vbYesNo)
If response = vbYes Then
ActiveDocument.Unprotect
ActiveDocument.Tables(1).Rows.Add
rownum = ActiveDocument.Tables(1).Rows.Count

For i = 1 To ActiveDocument.Tables(1).Columns.Count
ActiveDocument.FormFields.Add Range:=ActiveDocument.Tables(1).Cell(rownum,
i).Range, Type:=wdFieldFormTextInput
Next i
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
ActiveDocument.Tables(1).Columns.Count - 1).Range.FormFields(1).EntryMacro =
"addinfo"
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).ExitMacro =
"addrow"
ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count,
ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).Enabled = False
'ActiveDocument.Tables(1).Cell(ActiveDocument.Tabl es(1).Rows.Count,
1).Range.FormFields(1).Select
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End If

Cheers,
Al

"Kathryn Pundt" wrote:

I am creating a template in Word using tables. I want to lock certain cells
so no one can alter the contents.

  #7  
Old June 16th, 2007, 07:39 PM posted to microsoft.public.word.tables
Kathryn Pundt[_2_]
external usenet poster
 
Posts: 39
Default How do I lock a table cell in Word?

I'm am not sure I understand. This is what I understand you are trying to
convey.

Create a table. Insert textboxes into the table? Then, lock the texbox?

"Kathryn Pundt" wrote:

I am creating a template in Word using tables. I want to lock certain cells
so no one can alter the contents.

  #8  
Old June 16th, 2007, 08:09 PM posted to microsoft.public.word.tables
alborg
external usenet poster
 
Posts: 74
Default How do I lock a table cell in Word?

Hi Kathryn:

Yup... that's it. You gotta "lock" (i.e. disable) the textbox controls, not
the table.

BTW, the idea on how to programmatically add new rows with textboxes was
obtained from one of the most popular threads (check Show- Helpful threads)
with the title "Subject: How to insert multiple rows in tables". It
really is cool. The way I did it is the slightly improved version that works
in Word 2000/2002/2003 since the textbox "name" method didn't work in the MS
Word 2000 due to a Word bug.

Cheers,
AL

"Kathryn Pundt" wrote:

I'm am not sure I understand. This is what I understand you are trying to
convey.

Create a table. Insert textboxes into the table? Then, lock the texbox?

"Kathryn Pundt" wrote:

I am creating a template in Word using tables. I want to lock certain cells
so no one can alter the contents.

  #9  
Old June 16th, 2007, 08:15 PM posted to microsoft.public.word.tables
Kathryn Pundt[_2_]
external usenet poster
 
Posts: 39
Default How do I lock a table cell in Word?

Okay, I'll let you know how it goes.

As for the "how to programmatically add new rows with textboxes "
instructions, I don't know how to use user-programming. But, am very willing
to learn if you have the time...

"alborg" wrote:

Hi Kathryn:

Yup... that's it. You gotta "lock" (i.e. disable) the textbox controls, not
the table.

BTW, the idea on how to programmatically add new rows with textboxes was
obtained from one of the most popular threads (check Show- Helpful threads)
with the title "Subject: How to insert multiple rows in tables". It
really is cool. The way I did it is the slightly improved version that works
in Word 2000/2002/2003 since the textbox "name" method didn't work in the MS
Word 2000 due to a Word bug.

Cheers,
AL

"Kathryn Pundt" wrote:

I'm am not sure I understand. This is what I understand you are trying to
convey.

Create a table. Insert textboxes into the table? Then, lock the texbox?

"Kathryn Pundt" wrote:

I am creating a template in Word using tables. I want to lock certain cells
so no one can alter the contents.

  #10  
Old June 17th, 2007, 03:11 AM posted to microsoft.public.word.tables
alborg
external usenet poster
 
Posts: 74
Default How do I lock a table cell in Word?

Hi Kathryn:

Begin by looking at how the end result works- download the applet that I use
to follow patients in the hospital from-

http://www.emrupdate.com/files/folde...ntry67024.aspx

Tonight I'll guide you through how to add in the new textfields- not all
that hard.

Cheers,
Al


"Kathryn Pundt" wrote:

Okay, I'll let you know how it goes.

As for the "how to programmatically add new rows with textboxes "
instructions, I don't know how to use user-programming. But, am very willing
to learn if you have the time...

"alborg" wrote:

Hi Kathryn:

Yup... that's it. You gotta "lock" (i.e. disable) the textbox controls, not
the table.

BTW, the idea on how to programmatically add new rows with textboxes was
obtained from one of the most popular threads (check Show- Helpful threads)
with the title "Subject: How to insert multiple rows in tables". It
really is cool. The way I did it is the slightly improved version that works
in Word 2000/2002/2003 since the textbox "name" method didn't work in the MS
Word 2000 due to a Word bug.

Cheers,
AL

"Kathryn Pundt" wrote:

I'm am not sure I understand. This is what I understand you are trying to
convey.

Create a table. Insert textboxes into the table? Then, lock the texbox?

"Kathryn Pundt" wrote:

I am creating a template in Word using tables. I want to lock certain cells
so no one can alter the contents.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:05 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.