|
-
Sep 30th, 2002, 03:14 AM
#1
Thread Starter
Addicted Member
Common Dialog control
Hi
I am using a cdc control in an app. How do I pick up if the user has pressed the cancel button?
Thanking you in advance
PORRASTAR
-
Sep 30th, 2002, 03:15 AM
#2
Hyperactive Member
the return string is "" if cancel is pressed
-
Sep 30th, 2002, 03:17 AM
#3
PowerPoster
A better way to do it:
VB Code:
On Error GoTo EH:
CommonDialog1.CancelError = True
'do your cd code here
CommonDialog1.ShowOpen
'etc
Exit Sub
EH:
If Err.Number = 32755 Then
'Cancel was pressed
End If
Just make sure the CancelError property is set to true. You can set it at design time and take the first line of the code out where it sets it to true.
-
Sep 30th, 2002, 09:37 AM
#4
Software Eng.
In this case, where you don't really need to "handle" the error, you could just use the On Error Resume Next statement.
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
|