View Single Post
 
Old 12-03-2013, 12:30 PM
mhblake mhblake is offline Windows XP Office 2007
Novice
 
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