Hi =?Utf-8?B?S2V2aW4=?=,
Not sure if this is possible but I have a protected Word form where I need
the following to happen:
I have a checkbox where if it is unchecked then TextBox1 should be "N/A".
However
if the checkbox is clicked, I need Textbox1 to populate with Null, and
Textbox2 to populate with a hyperlink.
Anyone have any ideas how to do this?
You won't be able to put a hyperlink into a text box on a Word form. The rest
of it can be done relatively easily, by creating a "Sub" and assigning it to
the "On Exit" property of the checkbox. The macro could look something like
this:
Sub ExitCheckboxABC()
Dim ffldCheck as Word.FormField
Dim ffldText1 as Word.FormField
Set ffldCheck = ActiveDocument.FormFields("Check1")
Set ffldText1 = ActiveDocument.FormFields("Text1")
If ffldCheck.CheckBox.Value = True Then
ffldText1.Result = ""
Else
ffldText1.Result = "N/A"
End If
End Sub
On the word.mvps.org site you should find information on the only way you can
use a hyperlink in a Word document. Review that, and see if the basic
principle (Macrobutton field) is OK for you. Then you also need to consider
whether you really need that second textbox (is it for anything besides the
hyperlink). Probably, you could use macro code to change the contents of the
macrobutton field, so that a "hyperlink" is displayed, and the field links to
a macro, or not.
BTW I'm a beginner when it comes to programming so layman's terms would be
great!
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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
