Q. How to activate cancel button in dialog box? How do I assign the cancel property to the cancel button of a simple dialog box? I`ve written a macro in Excel using VB and use dialog box inputs to get user data. However, hitting the cancel button during data entry has no effect. A. What you have to do is set CancelError = True This means that if the user presses Cancel it causes an error - so then you set up an error trap to do what ever you want when the error happens. Look in the help file to get the exact syntax but it is something like this: 'Pseudo code on error goto errortrap ... ... ... 'all your stuff here ... ... ... exit sub errortrap: if err=32755 then 'that might not be the right value, you can look up the error 'codes in the help file. end if end sub (08-Aug-98 Dan Pupius danp600@aol.com