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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word_checkbox, use VBA to create a new one based on circumstances

Status
Not open for further replies.

565u

Technical User
Apr 25, 2005
46
CZ
Hi,
I wonder if it is possible to create a kind of MsgBox with checkboxes and an OK-Cancel buttons in Word (XP, 2002). I don't want to have the checkboxes stored anywhere because they will need to be created based on current circumstances (if that's possible). Say, I have variables x, y, z and want to allow the user to check True/False any of them, then click OK or Cancel. Next time, I may have four or perhaps two variables instead so I will need a different checkbox. I wonder if it may be possible at all? Could anybody kindly point me in the right direction, pls?
Many thanks in advance for any kind help!
Best regards,
PH
 
Thx for your kind reply Paul! Unfortunately I dont think this is it. Firstly it doesnt work for me, but I could probably get around that, but most importantly, I dont think it pops up any msgbox-like box. It has a checkbox in the text and that's not what I need. I will look more thru the code later today, but I dont believe formfields are the way to go. I could be wrong though, this is an area of VBA I have never visited before :)

Best regards,
Pavel
 
Unless you go down the userform route, you can't generate anything that pops up with checkboxes. But you'd still need something that would trigger the loading of the userform and your description gives no indication of how you'd propose to go about that. The code in the link I posted is designed to conditionally insert additional formfields if a checkbox in the document is checked. The same code could be used to delete the checkbox that triggered it.

Cheers
Paul Edstein
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top