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")
More Related Contents:
- Loop through files in a folder using VBA?
- How to error handle 1004 Error with WorksheetFunction.VLookup?
- Create a new sheet for each unique agent and move all data to each sheet
- Set Auto Filtering multiple wildcards
- How to make Excel VBA variables available to multiple macros?
- Use of symbol # (hash) in VBA Macro
- Using VBA code, how to export Excel worksheets as image in Excel 2003?
- Excel VBA: Can’t get a match, error “Unable to get the Match property of the WorksheetFunction class”
- Excel VBA looping through multiple worksheets
- When one should use Set [e.g for SpecialCells return value]?
- Excel: macro to export worksheet as CSV file without leaving my current Excel sheet
- Is there a faster CountIF
- Excel VBA How to detect if something was pasted in a Worksheet
- Getting error Procedure too large in VBA Macros (Excel)
- How to add data validation to a cell using VBA
- How to do late binding in VBA?
- How to break long string to multiple lines
- How to copy a chart from Excel to PowerPoint?
- Excel VBA Formula German/French/Italian/Russian/Dutch/Foreign Function
- vba paste not working
- Return a range from A1 to the true last used cell
- mac excel vba loop : from list & then export as pdf
- Can Advanced Filter criteria be in the VBA rather than a range?
- In Excel VBA, what is the way to check if the web page is fully loaded?
- Excel Useform: How to hide application but have icon in the taskbar
- Reading Web Pages using Excel VBA
- Excel VBA: auto click and open file from website
- How to have vba execute every 10 minutes?
- Read and write from/to registry in VBA
- Unable to read data from a CSV using ADO due to the driver thinking I am working with integers/number and showing nulls instead of text