> Sorry. The return value is 31
> Jack
>
>> What is the meaning of that error?
>> Jack
> No association
> Thanks, Jack
[quoted text clipped - 4 lines]
>>> What is the meaning of that error?
>>> Jack
Here is the code I use for that situation
Const SE_ERR_NOASSOC = 31
ShellRet = ShellExecute(Me.hwnd, "Open", MyFile, 0&, 0&,SW_SHOWNORMAL)
If ShellRet = SE_ERR_NOASSOC Then
Shell "rundll32.exe shell32.dll,OpenAs_RunDLL " &
MyFile,vbNormalFocus
End If
Basically, the same thing you get in Explorer when you double click a file
with no association.
HTH
Matt