You're using a Common Dialog control, right? If you set its CancelError property to True, it will raise a run-time error #32755 if the user cancels. Use an On Error statement to trap the error. Rick Sprague
Msg = "Do you want to request another Production File ?"
Ans = MsgBox(Msg, vbQuestion + vbYesNoCancel)
Select Case Ans
Case vbYes
activeworkbooks = "C:\My Excel Files\macro_inputbox_production.xls"
GoTo showinputbox
Case vbNo
Cancel = True
GoTo shutinputbox
Exit Sub
Case vbCancel
Cancel = True
GoTo showinputbox'******tell it to do something here!!!
Exit Sub
End Select
I'm having the same problem, did what rick said, and now i get the error msg 32755, the error handler (on error resume next) dosen't catch it, I know im missing something so stupidly simple, but i dont have any idea what. Any advise?
Dragnut
Dragnut, check your Tools>Options dialog, Advanced tab, to make sure you're using the Break on Unhandled Errors option. The other settings preempt your own error handling.
Rick Sprague
Thank you all guys. The reason it didn't work for me at first, and maybe it's the same for you dragnut is that i declared: cdl.CancelError = True
after i opened the dialog box, and not before.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.