If User Clicks Cancel in the GetOpenSave API

  • Thread starter Thread starter DZ
  • Start date Start date
D

DZ

I came up with way to handle the situation where a user clicks cancel in the
GetOpenSave API . I supposed that when the user clicks Cancel, the return
value will be "", I think. So an If statement can be used to handle the
Canceling of the GetOpenSave API

If strReturnFromGetOpenSaveAPI = "" Then
'Code
else
'Code
End If

Does anyone know if this the proper/reliable way to handle the canceling of
the GetOpenSave API

Thanks ! I will credit any responses
 
We need to see exactly how you're calling the API. The actual
GetOpenFileNameA returns a boolean value indicating whether or not a file
was selected.
 
Back
Top