How can Excel VBA open file using default application

This works for me in Excel & Word

Sub runit()
   Dim Shex As Object
   Set Shex = CreateObject("Shell.Application")
   tgtfile = "C:\Nax\dud.txt"
   Shex.Open (tgtfile)
End Sub

or … as per Expenzor’s comment below

CreateObject("Shell.Application").Open("C:\Nax\dud.txt")

Leave a Comment