
Code to drop down list on userform
1) You could muck around with SendKeys, or maybe all you need is to
just set a different default value using something like:
Dim d As DropDown
Set d = ActiveDocument.FormFields(1)
d.Value = 2
2) Use a continuous section break around the bit that needs form
protection. You will need to break your table to do this I think.
On Tue, 1 Jan 2002 15:28:27 -0500, "Dave"
Quote:
>Word97: Problem 1
>I want to ensure a drop-down field in an (Microsoft Speak) on-line form is
>changed if the default value (which is the first in the list) is incorrect
>for the user. So I thought an autoNew macro in the template that expands
>the drop down a list in a new document would be the way to go. So far, all
>I have been able to do is select the formfield using:
> ActiveDocument.Bookmarks("bmDept").Select which doesn't support the
>doClick method or
> Dim field1
> Set field1 = ActiveDocument.Fields(1)
> field1.DoClick
>which doesn't click the drop-down button to expand the list. The field is
>assigned a bookmark named "bmDept" and is the first field.
>Problem #2 On the same form, the third column in a table contains a checkbox
>for each row. In order to make the checkboxes accessible to the user, the
>table would have to be protected in the template, but then the rest of the
>table and the checkboxes cannot be accessed in the document. Any
>suggestions?
>Thanks.
Steve Hudson, Word Heretic
HDK List MVP