checkbox

N

Nadine Progscha

I created a protected word-document with several
formfields. In this document you can also find table with
36 cells (4 columns, 9 rows). In each of the cells of the
table I put a checkbox. The user navigates through the
document with the keyboard, so he jumps from formfield to
formfield. When he reaches the table, he should only have
the possibility to check one of four checkboxes in each
row.

What I need is some code which checks if a checkbox in the
row has the status "checked" or not. If it is checked I
need a command to tell the cursor to go to the first
checkbox in the next row of the table.
I tried it with this code, but it doesn't work:
If ActiveDocument.FormFields("checkbox1").CheckBox.Value =
true Then
Selection.GoTo What = wdGoToField, Name = "checkbox5"
End If
 
N

Nadine Progscha

Hi Doug,

thank you for the link. I read the article but there is
one problem. The text says, the user must use the mouse
when I use the method describe in the text. But in my case
the users only want to use the keyboard to navigate
through the document. So my problem is still the same. I
need a method to check if a checkbox in a row of a table
is checked and if so the cursor should jump to the first
checkbox in the next row automatically.

Nadine Progscha
 
D

Doug Robbins - Word MVP

Hi Nadine,

The only way you can check a checkbox is with the mouse.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
M

Mark Tangard

Isn't Nadine talking about checkbox formfields? And can't
you check or uncheck those by tabbing to them and pressing
the spacebar?

If ya can't, I may be in a parallel universe, and I think
I'll stay there.....
 
D

Doug Robbins - Word MVP

Hi Mark/Nadine,

Whodathunk that. S'pose if I read the instructions...

If a macro containing the following code is run on entry to each checkbox in
the row, when the user tabs into one that is checked, the selection will
move to the first check box in the next row.

If Selection.FormFields(1).CheckBox.Value = True Then
Selection.MoveDown wdLine
Selection.Rows(1).Range.FormFields(1).Range.Select
End If

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

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