[R] Using (D)COM in Excel

Yves Gauvreau cyg at sympatico.ca
Tue Jan 25 07:24:19 CET 2000


You have to add a reference to StatConnectorSrv. To do so go to the tool
menu under which you'll find the reference menu. Click on it and a dlg will
appear, find the component (StatConnectorSrv) click on the check box and
then click ok and you should be in business.

Yves


----- Original Message -----
From: "Amy C. Peng" <apeng at emmes.com>
To: <r-help at stat.math.ethz.ch>
Sent: Monday, January 24, 2000 9:52 PM
Subject: [R] Using (D)COM in Excel


> Dear Fellow R-Users:
>
> I am trying to install the (D)COM server, version 0.91.  I followed the
> installation instructions all the way through the command lines
>
>        %R_HOME%\bin\StatConnectorSrv /RegServer
>        regsvr32 %R_HOME%\bin\StatConnectorClnt.dll
>
> and everything so far seemed okay.  Then I logged out, and ran
> bin\vbtest.exe, and everything still seemed fine (it gave me a plot of a
> straight line).
>
> Then I went into Excel97, and I wrote the following macro into a module:
>
> Sub RunStatConnector()
>
>   Dim x As StatConnector
>   Set x = New StatConnector
>
>   On Error GoTo Error_Handler
>   x.Init ("R")
>   x.Close
>
> Error_Handler:
>   MsgBox x.GetErrorText, "R Server Error"
>
> End Sub
>
> and I got a compiler error message that says that the StatConnector
> user-defined type is not defined.
>
> Does anybody know how I should go about defining the user-defined type
> StatConnector?  Am I missing a step somewhere?  I thought maybe that by
> registering it using the regsvr32 command that somehow I've "defined" it
as
> a type recognizable by Microsoft, but I am not sure.
>
> Thanks for your help!
>
> Amy Peng
> The EMMES Corporation
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-
> r-help mailing list -- Read
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._
>

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list