LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 106
Default how to redirect in VBA?

I am trying to use redirection and it does not work.
***********
ds = InputBox("Type in reporting date as YYYY-MM-DD", "reporting date")
exestr = "Rterm --restore --save < m.in.R out.txt --args " & ds
ret = Shell(exestr) ' opens Rterm and does not source the script
*************
if I put the string in a batch file aaa.bat and use

ret=Shell(aaa.bat)

then redirection works, but I lose the return value from the process. ret
simply reports whether cmd started successfully.
I need to have the value returned from Rterm, which is 0 upon successful
finish and -1 otherwise.

 
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
Redirect source of pivot table maryj Excel Discussion (Misc queries) 5 September 21st 06 07:29 PM
column redirect kjs Setting up and Configuration of Excel 3 September 15th 06 06:06 PM
how do redirect Andrew Hansen Charts and Charting in Excel 1 April 8th 06 12:20 AM
Redirect formulas to a new sheet in workbook PA New Users to Excel 1 February 11th 06 10:59 PM
redirect from worksheet PeterAtherton Excel Discussion (Misc queries) 0 July 29th 05 12:06 AM


All times are GMT +1. The time now is 02:19 AM.

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

About Us

"It's about Microsoft Excel"