Set Property Values Accurately

Excel VBA does not always perform error checking when changing a property's value. To make sure things work right, code should only use what the documentation says are allowed values. For instance, will the following line set an option button so it is "on"?

Application.DialogSheets("Wiz2").[Option Button 5].Value = True

Nope. The code will run without reporting an error. A subsequent check of the button's value will fail because an option button's value property can only be xlOn or xlOff. A quick trip to the documentation will show this. So, the correct way to set the button's value property is:

Application.DialogSheets("Wiz2").[Option Button 5].Value = xlOn