Bluepoint Design

Practical cost effective solutions   
Multiple Multiple Choice

Home
Up
Multiple Choice Trick
Multiple Multiple Choice
Occurrences
Repeat Validation
GoTo
First file
Fax PDF Breakup
Day of Year
Multiple Attachments
Multiple eMail Addresses
Text Padding
Building TSV Files

Page last updated: 02/05/2008

Likely you followed a link from my Multiple Choice macro but in case you didn't please review it first. The Multiple Choice macro was mainly used to demonstrate how one can accumulate several results separated by a CRLF in in one var to have the user select... But what if your results have more than 36 returns? The simplest way is to display 35 results and add a "More..." to the end as illustrated here.

I had left my web page for MC with an invitation to describe this and shortly after that Pat challenged me to do so. Killing time waiting for a plan in SFO I started to write this macro the way I usually do and found a fatal flaw in my logic when it came to returns in exact multiples of 35. I had to completely redo it and it took me several attempts to get it right. Then it took even longer to document and post it here!

Multiple_Multiple_Choice.mex

This sample macro will return a list of subdirectories for a user selected directory. Once a selection is made the macro will open Explorer to that folder. There are no destructive commands. This could be used for anything like finding hits in an ASCII File Process command but I thought I would make it something simple There is also a macro in there that will create a batch of empty folders for testing.

Now I instantly had a problem because the added lines needed to handle the odd occurrences of the multiples of 35 obfuscates the flow of the macro. At first I created a complete flowchart but even that looked intimidating so I elected to also create a simple flowchart without the extra code just to give a user the main idea. Click on either of the thumbnails below to see for yourself.

Simple

Complex

 
Practical cost effective solutions