Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-03-2013, 12:30 PM
mhblake mhblake is offline Tying a check box to a macro/VBA to customize a document Windows XP Tying a check box to a macro/VBA to customize a document Office 2007
Novice
Tying a check box to a macro/VBA to customize a document
 
Join Date: Dec 2013
Posts: 5
mhblake is on a distinguished road
Default Tying a check box to a macro/VBA to customize a document

I'm working on creating a customizable form for our office and need some help. The document I'm looking to create may have one component or multiple components depending on the needs of the individual person using it. In essence, one person may just need Section A to show, while someone else may need Sections A, B, C, and F (in that order, of course).



To make things easier (I hope), the beginning of the document includes check boxes designating which sections are included. The idea is that the user would check whatever sections are needed, and they will appear in that order within the document.

I think the best way to accomplish what I'm looking to do is to tie a macro to each of the check boxes and then maybe use the "IncludeText" field to add the specific parts? Of course this would require maintaining a separate document for each section, which I'm okay with.

My question is how do I tie the macro to the field based on whether or not the box is checked? And once I do that, how do I ensure that the sections remain in order regardless of the order in which they're checked? In addition, which check box should I use - the legacy form or the ActiveX?

Whatever the solution, the end product needs to be user-friendly for the end-user. The individuals who will be using this range in experience from novice to moderately intermediate, so it can't be a complicated process for them.

As a bit of a disclaimer...I don't really know VBA. I've dabbled with it in Excel using the "record macro" feature, but I'm not real sure how to get it to do what I want here, and I definitely don't know how to write it.


Thanks much!!
Reply With Quote
  #2  
Old 12-04-2013, 01:41 PM
macropod's Avatar
macropod macropod is offline Tying a check box to a macro/VBA to customize a document Windows 7 32bit Tying a check box to a macro/VBA to customize a document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,371
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi mhblake,

IMHO, you'd do better to create a document template that contains all of the essentials for every form, with custom Quick Parts (aka Building Blocks) from which they can choose the additional content to insert. No code or checkboxes (which you'd probably then want to hide) to deal with.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 12-04-2013, 02:20 PM
mhblake mhblake is offline Tying a check box to a macro/VBA to customize a document Windows XP Tying a check box to a macro/VBA to customize a document Office 2007
Novice
Tying a check box to a macro/VBA to customize a document
 
Join Date: Dec 2013
Posts: 5
mhblake is on a distinguished road
Default

Aha!! Genius!

This is EXACTLY what I needed (I just didn't know it).

Thanks!!!
Reply With Quote
  #4  
Old 12-04-2013, 04:17 PM
macropod's Avatar
macropod macropod is offline Tying a check box to a macro/VBA to customize a document Windows 7 32bit Tying a check box to a macro/VBA to customize a document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,371
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Cross-posted at: http://www.mrexcel.com/forum/general...rd-2007-a.html
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tying a check box to a macro/VBA to customize a document Macro for check box in word Jeannie Cornia Word 3 01-21-2013 06:00 AM
Tying a check box to a macro/VBA to customize a document How do I check when my MS word document was last read? riff88 Word 1 09-18-2012 03:39 AM
tying to a critical activity ketanco Project 1 08-04-2012 05:59 AM
Check box macro help needed Aflac Word 4 03-24-2012 07:11 PM
Tying a check box to a macro/VBA to customize a document Check Box Macro Johnny thunder Word VBA 12 04-07-2011 04:47 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft