this way works as well....
'don't use long file names...it won't work...'open a file with associated app can be done this way [using API]
'open a file with it's associated application
'this example opens an mp3 file with winamp
'put this in a bas module
'
Public Declare Function ShellEx Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As Any, _
ByVal lpDirectory As Any, ByVal nShowCmd As Long) As Long
'
Sub ShellDef(strFileName)
x = ShellEx(Form1.hwnd, "open", strFileName, "", "", 1)
End Sub
'this goes in your form
Private Sub Command1_Click()
' >>> code for event on form <<<
'
Dim strYourFileVariable$
strYourFileVariable = "c:\myfolder\myFile.mp3"
ShellDef strYourFileVariable
'=====================================
End Sub