Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can try if the following works for you, else people in win32.programmer
group might be able to help. ' -------------------------------- Option Explicit ' Must add reference to "Windows Scripting Host Object Model ' Your AntiVirus program might prevent the script from running. Sub CallExcel() Dim WshShell Set WshShell = CreateObject("WScript.Shell") WshShell.Exec ("excel ""C:\Documents and Settings\Administrator\Desktop\yourfile.txt""") Set WshShell = Nothing End Sub ' -------------------------------- arunkhemlai "Jose Mourinho" wrote: Thanks, this is the same command that is used by my current macro though it is not sorting data correctly. However, if I manually use "Open with Excel" command on the text document (right-click document in Explorer, select Open with...Excel) then everything works fine: with the Workbook.OpenText sub it doesn't. Perhaps the question should be - what are the inbuilt arguments for this "Open with Excel.." command? Jose |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Excel Discussion (Misc queries) | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Setting up and Configuration of Excel | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
conditional formula to show "open" or "closed" | Excel Worksheet Functions | |||
Standard "Open" and "Save As" Buttons | Excel Programming |