2 questions

  • Thread starter Thread starter assaf1978
  • Start date Start date
A

assaf1978

Hi,
How do i add the following:
1) A check box that by a single click I mark it and unmark it
2) A text (or a text box) that has a built in text that when I click it, the
text disappears.

Thanks,
Assaf.
 
Hi,
How do i add the following:
1) A check box that by a single click I mark it and unmark it
2) A text (or a text box) that has a built in text that when I click it, the
text disappears.

Thanks,
Assaf.

In Word 2007, you can find controls on the Developer tag. If you don't
have a developer tag, click the Office button in Word, choose Word
options, and select "Show developer tab in the ribbon" from the
popular tab.

There is a checkbox which does what you want.

The textbox needs some extra coding. You can set its default text
using the Text property. In the code window, you would handle the
MouseUp event.

' === Begin code ===
Private Sub TextBox1_MouseUp(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)

If TextBox1.Text = "Default text" Then
TextBox1.Text = ""
End If

End Sub
' === End code ===

Yves
 
Can you please tell me how both of them can co-exist under protected form?
when I protect the document to use the check box, I cannot edit text....
 
They can't both co-exist. You either use a protected form with form fields
or macrobutton fields. The link I posted earlier shows how to create
checkable boxes with the latter.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
You have a choice: you can use form fields, which allows you to have a
single-click check box, but then you have to add text form fields where you
want text entry, and you have to protect the document. Or you can use
MacroButton fields, which don't require document protection. They allow you
to click in the field and replace it, but the check box requires macros (see
http://gregmaxey.mvps.org/Add_Toggle_Objects.htm) and also requires a
double-click to check/uncheck.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
If you want to go with macrobutton fields, you can set an option to make
them use a single-click instead of a double-click. This is described in the
section "Double-click or single-click" of
http://www.word.mvps.org/FAQs/TblsFldsFms/HLinksInForms.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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

Back
Top