Hi KZ, I don't think that I can answer what I think is the precise question - how to run the R file from VBA but without using RExcel.
However with RExcel installed, I have found it very straightforward to run R code from within VBA (thanks Erich Neuwirth - RExcel is great). The VBA code is: RInterface.StartRServer RInterface.RunRFile "C:\Excel_R_script.txt" RInterface.StopRServer That is all that it takes. "Excel_R_script.txt" is just standard R code, in a text file. Is there a reason you don't want to use RExcel? Guy -- View this message in context: http://n4.nabble.com/how-to-use-Excel-VBA-s-Shell-to-call-and-execute-R-file-tp2014944p2015718.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.