Closing FileProperties without error

J

Jants

Hi, when I use the following code:
x = Application.Dialogs(750).Show
If x = "-1" Then
MsgBox "Cancel"
Else: MsgBox "OK"
End If

I get an error when I hit Cancel. How can I fix this ? I just want to close
the damned dialogbox when I hit Cancel :) Can anyone help ?
 
H

Helmut Weber

Hi,

is there any reason for avoiding
error handling?

Dim x As Long
On Error GoTo fertig
x = Application.Dialogs(750).Show
MsgBox "OK"
fertig:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top