Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SAVE and SAVE AS options disappeared from the drop down FILE menu [email protected] Excel Discussion (Misc queries) 2 July 12th 07 09:14 AM
when i save xls file, debug script is running and canno't save fil Imtiaz Excel Discussion (Misc queries) 1 July 16th 05 03:47 PM
Excell2003 (SP-1) File > Save and File > Save As.. grayed out Joe Murphy Excel Discussion (Misc queries) 0 March 9th 05 10:00 PM
Save & Save As features in file menu of Excel Blue Excel Discussion (Misc queries) 9 December 27th 04 08:49 PM
Save Excel file - prompts to save - no Volitile functions used POWER CERTS Excel Worksheet Functions 2 November 1st 04 09:27 PM


All times are GMT +1. The time now is 12:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"