search and open file IE

voycron

New Member
Joined
Apr 5, 2010
Messages
6
Not sure if this is possible, but any advise or assistance would be much appreciated.

i have used the code below to determine whether a file(00783763091_2011022313*.wav) or folder exists. If it was possible for the code to return "File exist!", is it possible to open that file?

The naming of the wav file is a variable, but is created by a user and is an unique entry. A program then adds random numeric digits at the end of this naming to prevent duplicates. This process is unnecessary, but cannot be terminated.

Because of this unnecessary process I replaced these added entries with "*" as there is no mathematical way to determine these random entries. Now that i have found a way to search and confirmed that 00783763091_2011022313*.wav" exist, is there a way to open this file. eg. through IE and have QuickTime automatically start playing the file?

Thanks

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Public Sub TestFileExistence()
If FileFolderExists("c:\documents\00783763091_2011022313*.wav") Then
MsgBox "File exists!"
'Shell "C:\Program Files\Internet Explorer\iexplore.exe " & "c:\documents\00783763091_2011022313*.wav", vbNormalFocus '', vbMinimizedFocus"
Else
MsgBox "File does not exist!"
End If
End Sub
Public Function FileFolderExists(strFullPath As String) As Boolean
'Author : Ken Puls (www.excelguru.ca)
'Macro Purpose: Check if a file or folder exists
On Error GoTo EarlyExit
If Not Dir(strFullPath, vbDirectory) = vbNullString Then FileFolderExists = True
EarlyExit:
On Error GoTo 0
End Function

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top