Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
save txt file
"Hank Scorpio" wrote in message ... On Tue, 22 Jul 2003 13:23:19 +0200, "Domagoj Vulin" wrote: I'm VBA newbie and trying to save .txt file from Excel. The problem is that it saves it in root of current active drive (in my case it is E:) How can I get the folder where workbook is saved, something like Server.MapPath in ASP? ActiveWorkbook.Path will give you the path of the active workbook. However if the workbook hasn't been saved, it will return an empty string. Thanks, that's what I needed Second problem - is it possible to run exe application from excel? The point is that i have old fortran application, so I want to save input data from excel to txt file, execute fortran application which saves the output into output txt file and then, at last open from Excel macro that output file and parse it to spreadsheet. See on-line help for the Shell function, a summary of which is below: -------------------------------- Shell Function Runs an executable program and returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero. Syntax Shell(pathname[,windowstyle]) --------------------------------- --------------------------------------------------------- Now I have to try this... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SAVE and SAVE AS options disappeared from the drop down FILE menu | Excel Discussion (Misc queries) | |||
when i save xls file, debug script is running and canno't save fil | Excel Discussion (Misc queries) | |||
Excell2003 (SP-1) File > Save and File > Save As.. grayed out | Excel Discussion (Misc queries) | |||
Save & Save As features in file menu of Excel | Excel Discussion (Misc queries) | |||
Save Excel file - prompts to save - no Volitile functions used | Excel Worksheet Functions |