Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comand Dialog Box Preventing Errors

Status
Not open for further replies.

campbere

Technical User
Oct 10, 2000
146
US
I am using a command dialog box for colors on a form. A user activates the color dialog box through a drop down menu.

I have coded an error procedure so that if the user selects the color menu and decides they don't want to change the color of the form that it stays at the original color. However the user can just hit ok without meaning to change the color and the color will change to black. Is there a way to error code this as well?


Thanks,

Campbere [sig][/sig]
 
It can be done on the CancelError property of the commondialog control

if Commondialog1.CancelError = false Then'The User Clicked OK
Prompt for confirmation
end if


hope this helps
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top