Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Excel Add-in problem

Subject: Excel Add-in problem

From: Willem

Date: 22 Sep, 2012 19:41:09

Message: 1 of 2

Hello everyone,

I've built a Matlab function that I am now using in Excel.
When I use the function in the worksheet, there are no problems.
When I use the function in visual basic, with exactly the same inputs (all checked and correct) as in the worksheet mode, it gives following error:

"Output argument "Y" (and maybe others) not assigned during call to ..."

This refers to a function 'x12' that I use, and that was added to the add-in. (Again, there are no problems using my function in the worksheet)

Anyone any ideas about what might be the problem? I've been looking a couple of days for this and I'm beat :).

Thanks!

Willem

Subject: Excel Add-in problem

From: Ryan

Date: 21 Oct, 2012 18:31:08

Message: 2 of 2

When you do this, make sure you fully qualify all objects; Excel, Workbook, Worksheet, Ranges, etc.

Here are some examples:
http://www.vbaexpress.com/forum/archive/index.php/t-27992.html

http://www.techrepublic.com/blog/10things/10-ways-to-reference-excel-workbooks-and-sheets-using-vba/967

http://p2p.wrox.com/book-excel-2007-vba-programmers-reference-isbn-978-0-470-04643-2/82673-open-copy-sheet-another-workbook.html


Regards,
Ryan--


"Willem" wrote in message <k3l48l$93d$1@newscl01ah.mathworks.com>...
> Hello everyone,
>
> I've built a Matlab function that I am now using in Excel.
> When I use the function in the worksheet, there are no problems.
> When I use the function in visual basic, with exactly the same inputs (all checked and correct) as in the worksheet mode, it gives following error:
>
> "Output argument "Y" (and maybe others) not assigned during call to ..."
>
> This refers to a function 'x12' that I use, and that was added to the add-in. (Again, there are no problems using my function in the worksheet)
>
> Anyone any ideas about what might be the problem? I've been looking a couple of days for this and I'm beat :).
>
> Thanks!
>
> Willem

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us