Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Macro Grief

Status
Not open for further replies.

ChefSausage

Programmer
Oct 19, 2002
36
US
I'm trying to create a word macro that creates two checkboxes, only one of which is checked at any given time.

When I use the "Form" toolbox, it places this gray checkbox that isn't clickable. When I use the "Control" toolbox, it presents me with the option to place the checkbox I need, but no ability to manipulate the "Checkbox 1" text that appears with it.

I know that the macro code uses the inline object to create the checkbox, but don't know how to manipulate it while in macro mode to A) get rid of the text, and B) reduce the overall size of the checkbox to 14x14 so macro records the instructions. Thanks in advance.
 
Form fields:


The whole trick to them is that you must protect the document when you're done. If you only want the two checkboxes, then place a continuous section break before them, and one after them. Then, Tools-Protect Document, hit Sections and only choose the section that contains the checkboxes. No protection-->No workee. Anne Troy
 
Thank you for the site URL; it'll come in handy for future references, but it doesn't help with my issue on a deeper level.

The client gave us .dot templates for reference on what to make the macros into. One one particular template, they have assigned two checkboxes within a table, appropriately titled 'Yes' and 'No'.

When I move my mouse over either of the checkboxes, the arrowpoint creates a 4-arrow icon under the tip of the arrowpoint itself. When I click on either of the checkboxes, only one is allowed to be clicked at a time, and it doesn't make a "check" in the box, but creates 4 small circles on each of the corners of the checkbx. Plus, it's not in protected mode. AFTER I click one, the Form Toolbox (and most of the other toolboxes, too) become unusuable, save for the lockbox icon in Form Toolbox. I can still navigate around the whole template as well.

I've never seen checkboxes that work like this in Word before. Do you know what types these are or how they're created?
 
I see. You are using the Control Toolbox. I would get rid of those. You can run macros on the Forms toolbar checkboxes just as easy. It also sounds like you might not have your macro security settings properly set. Tools-Macro-Security must be set to Medium or Low if you are to use *controls* properly. Otherwise, you get the 4-way. Sounds to me like whoever gave you the docs with the checkboxes really doesn't know what they're doing. Anne Troy
 
God bless you, Dreamboat. I really, really appreciate this assistance since I'm forced to learn this on the fly.

I see what you meant about the Control Toolbox and the security measures. My question to you is how I can write a macro that knows when to turn Protected Mode on and off when they start and are done with the checkbox selections. It may seem impossible since Word doesn't know when they start or finish.

At the very least, how would I create those Control Toolbox types minues the "Checkbox 1" text that always accompanies it.

Now when I click the checkbox it gives me {FORMCHECKBOX} instead of the actual checkbox. Now I'm going nuts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top