PDA

View Full Version : Checking conditions to determine what commandbuttons should be enabled



Bob Blooms
12-17-2009, 06:54 AM
There are 5 command buttons that need to be controlled to reduce operator error. What command buttons are enabled are a function of the conditions in 2 text boxes and 1 list box.

I would like to set up a nested if statment that is "live" as long as the form is open.

Two questions: (1) Is a nested if statement a best practice for this scenario; and (2) If so, where do I put the code?

The attachment shows the userform and the logic (I am trying to develop)

Bob Phillips
12-17-2009, 07:36 AM
A nested if would seem okay, but it should be in a separate procedure, and call that procedure EVERY time any of the events being monitored happen.