Today something happened (never had this problem before) when I start up Excel workbook where I use Rexcel.
And then there are some more errors... Everything worked properly before.. Does anyone have an idea about what the problem could be?
The other strange thing is that after that the Rapply and so on works.. But I get errors again when I close workbook.
So the problem appears when I startR
from Rexcel meny in Excel.
EDIT:
Thanks to flodel
for his answer. But is it not possible to run the Sub below now or?
Sub create_efficient_frontier()
RInterface.StartRServer
Sheets("Analys").Range("A52:K82").ClearContents
RInterface.PutDataframe "datat", Range("ChosenData!X181:AD352")
RInterface.PutArray "startdate", Range("Analys!K2")
RInterface.PutArray "enddate", Range("Analys!K3")
RInterface.RunRFile "C:/Users/Documents/EffFront.R"
RInterface.GetDataframe "hmz$pweight", Range("Analys!A51:E76")
End Sub
I get runtime error 13 ("incompatible types") at line
RInterface.GetDataframe "hmz$pweight", Range("Analys!A51:E76")
That worked yesterday, see Run macro with Rexcel
Solution:
Ctrl+Alt+Shift+F9 seems to work:)
Best Regards