I recently uninstalled an older version of Matlab(2007a I think) and now my macros don't work. I have been using 2008a for a while now but I didn't realize that my macros were still using the old version. I use macros in excel and outlook that use matlab as an automation server (Matlab.Application). My problem seems to be that the macro is still trying to use the old version of matlab that is no longer installed. The only ProgID that I can get to work is: Matlab.Desktop.Application which seems to stay running once the macro is done.
The below code shows the change that has to be made.
I am using "Microsoft Visual Basic 6.5"
Dim Result As String
Dim Matlab As Object
'Set Matlab = CreateObject("Matlab.Application") used to work but now the below line needs to be used:
Set Matlab = CreateObject("Matlab.Desktop.Application")
Result = Matlab.Execute("outlook")
Does anyone know how I can get Visual Basic to work with my new matlab? Please let me know if I was unclear with anything.
Thanks,
Dan
From the help:
The MATLAB ProgIDs are
*Matlab.Application — Starts a command window Automation server with the version of MATLAB that was most recently used as an Automation server (might not be the latest installed version of MATLAB).
*Matlab.Autoserver — Starts a command window Automation server using the most recent version of MATLAB.
*Matlab.Desktop.Application — Starts the full desktop MATLAB as an Automation server using the most recent version of MATLAB.
Subject: Matlab.Application stopped working with 2008a
"Dan Haeg" <haegd@msoe.edu> wrote in message <gbpa8j$sco$1@fred.mathworks.com>...
> I recently uninstalled an older version of Matlab(2007a I think) and now my macros don't work. I have been using 2008a for a while now but I didn't realize that my macros were still using the old version. I use macros in excel and outlook that use matlab as an automation server (Matlab.Application). My problem seems to be that the macro is still trying to use the old version of matlab that is no longer installed. The only ProgID that I can get to work is: Matlab.Desktop.Application which seems to stay running once the macro is done.
>
> The below code shows the change that has to be made.
> I am using "Microsoft Visual Basic 6.5"
>
> Dim Result As String
> Dim Matlab As Object
>
> 'Set Matlab = CreateObject("Matlab.Application") used to work but now the below line needs to be used:
> Set Matlab = CreateObject("Matlab.Desktop.Application")
>
> Result = Matlab.Execute("outlook")
>
>
> Does anyone know how I can get Visual Basic to work with my new matlab? Please let me know if I was unclear with anything.
>
> Thanks,
> Dan
>
> From the help:
>
> The MATLAB ProgIDs are
> *Matlab.Application — Starts a command window Automation server with the version of MATLAB that was most recently used as an Automation server (might not be the latest installed version of MATLAB).
> *Matlab.Autoserver — Starts a command window Automation server using the most recent version of MATLAB.
> *Matlab.Desktop.Application — Starts the full desktop MATLAB as an Automation server using the most recent version of MATLAB.
Can anyone help me?
Subject: Matlab.Application stopped working with 2008a
On Oct 8, 3:50=A0am, "Dan Haeg" <ha...@msoe.edu> wrote:
> "Dan Haeg" <ha...@msoe.edu> wrote in message <gbpa8j$sc...@fred.mathworks=
.com>...
> > I recently uninstalled an older version of Matlab(2007a I think) and no=
w my macros don't work. I have been using 2008a for a while now but I didn'=
t realize that my macros were still using the old version. I use macros in =
excel and outlook that use matlab as an automation server (Matlab.Applicati=
on). My problem seems to be that the macro is still trying to use the old v=
ersion of matlab that is no longer installed. The only ProgID that I can ge=
t to work is: Matlab.Desktop.Application which seems to stay running once t=
he macro is done.
>
> > The below code shows the change that has to be made.
> > I am using "Microsoft Visual Basic 6.5"
>
> > Dim Result As String
> > Dim Matlab As Object
>
> > 'Set Matlab =3D CreateObject("Matlab.Application") used to work but now=
the below line needs to be used:
> > Set Matlab =3D CreateObject("Matlab.Desktop.Application")
>
> > Result =3D Matlab.Execute("outlook")
>
> > Does anyone know how I can get Visual Basic to work with my new matlab?=
Please let me know if I was unclear with anything.
>
> > Thanks,
> > Dan
>
> > From the help:
>
> > The MATLAB ProgIDs are
> > =A0 =A0 *Matlab.Application — Starts a command window Automation =
server with the version of MATLAB that was most recently used as an Automat=
ion server (might not be the latest installed version of MATLAB).
> > =A0 =A0 *Matlab.Autoserver — Starts a command window Automation s=
erver using the most recent version of MATLAB.
> > =A0 =A0 *Matlab.Desktop.Application — Starts the full desktop MAT=
LAB as an Automation server using the most recent version of MATLAB.
>
> Can anyone help me?
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.