Which checkbox is checked, which isn't?

B

Bruce Brown

Within each of two AutoTextList fields is a Wingdings symbol: in one,
a blank checkbox; in the other, a checked checkbox. Both fields are
bookmarked, so the contents can be tested as either the text of the
bookmark range or the result of the field.

Problem: how to tell which checkbox is checked and which is blank?
Reminder: neither is a form field checkbox.

This code inserts the two symbols and may give you some clues:

Selection.InsertSymbol Font:="Wingdings", CharacterNumber:=-3842,
Unicode _
:=True'CHECKED CHECKBOX

Selection.InsertSymbol Font:="Wingdings", CharacterNumber:=-3928,
Unicode _
:=True'BLANK CHECKBOX

Every VBA test I've run so far gives the same number for both symbols.
Scrolling through the entire object browser was fruitless; symbol
isn't an object. Searching for Unicode, CharacterNumber and Checkbox
proved an equal waste of time.

Your one-line code solution will be much appreciated!
 
W

Word Heretic

G'day (e-mail address removed) (Bruce Brown),

look at the unicode of the appropriate range and decide yourself.


(e-mail address removed) (Bruce Brown) was spinning this yarn:
Within each of two AutoTextList fields is a Wingdings symbol: in one,
a blank checkbox; in the other, a checked checkbox. Both fields are
bookmarked, so the contents can be tested as either the text of the
bookmark range or the result of the field.

Problem: how to tell which checkbox is checked and which is blank?
Reminder: neither is a form field checkbox.

This code inserts the two symbols and may give you some clues:

Selection.InsertSymbol Font:="Wingdings", CharacterNumber:=-3842,
Unicode _
:=True'CHECKED CHECKBOX

Selection.InsertSymbol Font:="Wingdings", CharacterNumber:=-3928,
Unicode _
:=True'BLANK CHECKBOX

Every VBA test I've run so far gives the same number for both symbols.
Scrolling through the entire object browser was fruitless; symbol
isn't an object. Searching for Unicode, CharacterNumber and Checkbox
proved an equal waste of time.

Your one-line code solution will be much appreciated!

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

Replies offlist may require payment.
 
C

Cindy M -WordMVP-

Hi Bruce,
Within each of two AutoTextList fields is a Wingdings symbol: in one,
a blank checkbox; in the other, a checked checkbox. Both fields are
bookmarked, so the contents can be tested as either the text of the
bookmark range or the result of the field.
How about using two different bookmark names? Then you can use
Boomarks("Name").Exists to determine which is present.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

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