Bluepoint Design

Practical cost effective solutions   
Macro Express Sample Macro: Repeat Validation

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: 11/21/2007

A few minutes ago I was writing about using GoTos and how it's a sloppy way to get the job done and I thought of another one I've been meaning to write up. Often people use GoTo's in user input validation but the simple Repeat Until does a much better job. The simplest example is a null input. Here we put a repeat in front of and after the input and use a conditional repeat. Just make the condition "Is not equal to null".

You can expand this to do other tests as well. Simply do something like Repeat Until T1 = "Good" and in your failure conditions set T1 to "Bad". Easy!

 
Practical cost effective solutions