View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Opening files from Excel

Generally opening any file requires an executable to do it wether its a .doc,
..xls or anything else

Try this

myfile = Shell("NOTEPAD.EXE " & "c:\lastrow.txt", vbNormalFocus)

This would open lastrow.txt from the root of C with Notepad

Mike

"S Taylor" wrote:

I am trying open non-excel files that are not .exe files from Excel VBA

When I use the Shell command it doesn't work, I believe that this is because
Shell only opens files that are .exe.

Is there a method that can open other files from Excel VBA?