|
-
Dec 7th, 2024, 05:08 PM
#1
Thread Starter
New Member
Can't catch error from Cancel button on Common Dialog Box
I have searched for the answer to this but the typical response to catch when a common dialog box is shown with the showsave or showopen and the user hits cancel it ignores my on error goto statement. It throws the error and the project goto debug mode.
On Error GoTo ErrHandler
CommonDialog1.CancelError = True
CommonDialog1.DialogTitle = MSG66
CommonDialog1.FilterIndex = 1
CommonDialog1.DefaultExt = "xlsx"
CommonDialog1.Filter = "Excel (*.xlsx)|*.xlsx|(*.xls)|*.xls|All Files (*.*)|*.*"
CommonDialog1.InitDir = path
CommonDialog1.FileName = path & "AuditorRecap"
'CommonDialog1.CancelError = True
CommonDialog1.FLAGS = FileOpenConstants.cdlOFNOverwritePrompt + FileOpenConstants.cdlOFNHideReadOnly
'Show the dialog box
CommonDialog1.ShowSave -> user hits cancel and project throws the prompt with Run-time error 32755, cancel was selected with the End and Debug buttons. Hit debug and it is on this line
I have noted that the past posts on this were using the Common Dialog Box with SP3. I am on SP6 and went back to SP3 Common Dialog Box and that made no difference.
Any clues?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|