CreateObject("Shell.Application").ShellExecute "C:\Users\Iain\Song Title.wav"
Hi Robert, apologies for my slow response - this is perfect. Thank you.Try this (obviously changing the full path to where the file resides first):
VBA Code:CreateObject("Shell.Application").ShellExecute "C:\Users\Iain\Song Title.wav"
Regards,
Robert
Option Explicit
Sub Macro1()
Dim objWSH As Object
Set objWSH = CreateObject("WScript.Shell")
objWSH.Run ("""C:\Users\Iain\Song Title.wav"""), 0 '0 = Hide the file
Set objWSH = Nothing
End Sub
Thank you for your help Robert - much appreciated!Hi Iain,
I'm sure there's a way but I'm not sure to be honest. You can use this that hides the file...
VBA Code:Option Explicit Sub Macro1() Dim objWSH As Object Set objWSH = CreateObject("WScript.Shell") objWSH.Run ("""C:\Users\Iain\Song Title.wav"""), 0 '0 = Hide the file Set objWSH = Nothing End Sub
...but to minimize the file you can try the Application.FollowHyperlink method but that produces a series of alerts that I believe can only be turned off via editing the registry (refer here).
Maybe someone on the forum will have a solution.
Regards,
Robert