Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Open with.. Excel" in vb
I use a program that outputs a large text file of numerical data. The output
of the program can be set such that using the "Open with Excel.." command in Windows automatically gives a neat, aligned data set in Excel with headers in the correct places etc. (with excel text wizard this is a long process) How can the "Open with Excel.." command be activated using vb in Excel? Thanks Mo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Open with.. Excel" in vb
Workbooks.OpenText (arg1, arg2, ...).
See help file for more info. HTH, arunkhemlai "Jose Mourinho" wrote: I use a program that outputs a large text file of numerical data. The output of the program can be set such that using the "Open with Excel.." command in Windows automatically gives a neat, aligned data set in Excel with headers in the correct places etc. (with excel text wizard this is a long process) How can the "Open with Excel.." command be activated using vb in Excel? Thanks Mo |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Open with.. Excel" in vb
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 "arunkhemlai" wrote: Workbooks.OpenText (arg1, arg2, ...). See help file for more info. HTH, arunkhemlai "Jose Mourinho" wrote: I use a program that outputs a large text file of numerical data. The output of the program can be set such that using the "Open with Excel.." command in Windows automatically gives a neat, aligned data set in Excel with headers in the correct places etc. (with excel text wizard this is a long process) How can the "Open with Excel.." command be activated using vb in Excel? Thanks Mo |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
"Open with.. Excel" in vb
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
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 |