Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How to create a text box and combo box within

See http://www.gmayor.com/installing_macro.htm for instructions on using
macro listings and
http://www.gmayor.com/Macrobutton.htm and
http://gregmaxey.mvps.org/Add_Toggle_Objects.htm explain the creation of
checkable boxes.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Eric wrote:
Thank everyone very much for suggestions
I see the Macro coding, but I still don't know how to create a
checkbox in word.
I have tried to create a checkbox, but get no idea on how to work on
the macro coding related to this checkbox.
Does anyone have any suggestions on how to do it?
Thank everyone very much for any suggestions
Eric

http://addbalance.com/word/download.htm#PageStart
http://addbalance.com/word/download/...oxtemplate.zip
CheckBox REF Substitute.doc

Macro Coding for checkbox
Option Explicit

Sub CopyCheckBoxMacro()
' Macro written by Charles Kenyon
' 21 December 2001 revised 11 January 2002
'
' Declare variables
Dim sCheck As String
Dim bCheck As Boolean
Dim sChecka As String
Dim sCheckb As String
'
' Get name and value of formfield which was just used and
' set variable for dependent formfield name
sCheck = Selection.FormFields.Item(1).Name
sChecka = sCheck & "a"
sCheckb = sCheck & "b"
bCheck = ActiveDocument.FormFields(sCheck).CheckBox.Value
'
' Unprotect document
ActiveDocument.Unprotect
'
' Set value for dependent checkboxes and reprotect document
ActiveDocument.FormFields(sChecka).CheckBox.Value = bCheck
ActiveDocument.FormFields(sCheckb).CheckBox.Value = bCheck
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End Sub



Option Explicit

Sub CopyCheckBoxMacro()
' Macro written by Charles Kenyon
' 21 December 2001 revised 11 January 2002
'
' Declare variables
Dim sCheck As String
Dim bCheck As Boolean
Dim sChecka As String
Dim sCheckb As String
'
' Get name and value of formfield which was just used and
' set variable for dependent formfield name
sCheck = Selection.FormFields.Item(1).Name
sChecka = sCheck & "a"
sCheckb = sCheck & "b"
bCheck = ActiveDocument.FormFields(sCheck).CheckBox.Value
'
' Unprotect document
ActiveDocument.Unprotect
'
' Set value for dependent checkboxes and reprotect document
ActiveDocument.FormFields(sChecka).CheckBox.Value = bCheck
ActiveDocument.FormFields(sCheckb).CheckBox.Value = bCheck
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End Sub


"Doug Robbins - Word MVP" wrote:

Get the Checkbox Add-in that can be down loaded from Charles Kenyon's
website at:

http://addbalance.com/word/download.htm#PageStart


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Eric" wrote in message
...
Thank you very much for your suggestions
Could you please tell me where I can find the option for checkbox
formfield
to be inserted in word?
Thank you very much for any suggestions
Eric

"Doug Robbins - Word MVP" wrote:

Insert a Checkbox formfield alongside each item that you want the
user to be
able to select.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of
my services on a paid consulting basis.

Doug Robbins - Word MVP

"Eric" wrote in message
...
Does anyone have any suggestions on how to create combo box
within word document?
For example, how to create a list of options, and would like to
create a
square box, if people click on it, it will display a cross for
selected items, and they can select more than one box at the same
time.
Does anyone have any suggestions on how to create this features
on word documents?
Thanks in advance for any suggestions
Eric



 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a text box and combo box within word? Eric Microsoft Word Help 1 June 8th 08 01:48 PM
Create the list for combo box for Word 2003 okeanaman New Users 1 August 4th 06 04:46 PM
How do I get a combo box up when I create a form template? 2bn4med Microsoft Word Help 3 May 11th 06 05:47 PM
Create Protected Word template that uses combo box & combo box val Cindy Microsoft Word Help 1 April 1st 05 05:10 PM
how do i add text to a combo box in word? Johnnyh10 Microsoft Word Help 1 March 30th 05 04:27 PM


All times are GMT +1. The time now is 03:23 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"