PC Review


Reply
Thread Tools Rate Thread

calling VBA from EXCEL

 
 
LesHurley
Guest
Posts: n/a
 
      1st Feb 2008
I have a VBA procedure Aug that augments one matrix with another as in Aug(M,b)
M b

1 2 3 2 1
3 2 1 3 4
4 1 0 4 1

A

1 2 3 2 1
3 2 1 3 4
4 1 0 4 1

Then I can call another of my VBA procedures, Canform(A) which calculates
the canonical form of A as in

C

1 0 0 1.125 -0.875
0 1 0 -0.5 4.5
0 0 1 0.625 -2.375

This also works fine.
I think I should call them serialy as =canform(aug(M,b)) and get the same
result. What I get is an error message that says "A value used in the
formula is of the wrong data type.

What's wrong with this?

--
Thanks for your help
 
Reply With Quote
 
 
 
 
Leith Ross
Guest
Posts: n/a
 
      1st Feb 2008
On Jan 31, 4:00 pm, LesHurley <LesHur...@discussions.microsoft.com>
wrote:
> I have a VBA procedure Aug that augments one matrix with another as in Aug(M,b)
> M b
>
> 1 2 3 2 1
> 3 2 1 3 4
> 4 1 0 4 1
>
> A
>
> 1 2 3 2 1
> 3 2 1 3 4
> 4 1 0 4 1
>
> Then I can call another of my VBA procedures, Canform(A) which calculates
> the canonical form of A as in
>
> C
>
> 1 0 0 1.125 -0.875
> 0 1 0 -0.5 4.5
> 0 0 1 0.625 -2.375
>
> This also works fine.
> I think I should call them serialy as =canform(aug(M,b)) and get the same
> result. What I get is an error message that says "A value used in the
> formula is of the wrong data type.
>
> What's wrong with this?
>
> --
> Thanks for your help


Hello LesHurley,

You need to show the VBA code for both procedures: Aug(M,b) and
Canform(), before anyone can answer your question.

Sincerely,
Leith Ross
 
Reply With Quote
 
LesHurley
Guest
Posts: n/a
 
      1st Feb 2008
Thanks for the reply, Leith. I wouldn't mind sending the code but that's
quite a bit of code to display in the small window we have available.
Canform() itself has about 75 lines, and it calls two other function
procedures, all together about 150 lines of code. Aug() is smaller, about 35
lines. I think I will write two much simpler test routines and see if I can
successfully do the same thing with them. If not, the group will here from
me again.
Thanks for your help


"Leith Ross" wrote:

> On Jan 31, 4:00 pm, LesHurley <LesHur...@discussions.microsoft.com>
> wrote:
> > I have a VBA procedure Aug that augments one matrix with another as in Aug(M,b)
> > M b
> >
> > 1 2 3 2 1
> > 3 2 1 3 4
> > 4 1 0 4 1
> >
> > A
> >
> > 1 2 3 2 1
> > 3 2 1 3 4
> > 4 1 0 4 1
> >
> > Then I can call another of my VBA procedures, Canform(A) which calculates
> > the canonical form of A as in
> >
> > C
> >
> > 1 0 0 1.125 -0.875
> > 0 1 0 -0.5 4.5
> > 0 0 1 0.625 -2.375
> >
> > This also works fine.
> > I think I should call them serialy as =canform(aug(M,b)) and get the same
> > result. What I get is an error message that says "A value used in the
> > formula is of the wrong data type.
> >
> > What's wrong with this?
> >
> > --
> > Thanks for your help

>
> Hello LesHurley,
>
> You need to show the VBA code for both procedures: Aug(M,b) and
> Canform(), before anyone can answer your question.
>
> Sincerely,
> Leith Ross
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with calling an Excel program in a Excel cell chichi Microsoft Excel Programming 2 4th Aug 2008 01:10 PM
calling a C++ program from Excel 2000 and passing a result from C++ back to an excel spreadsheet ellis kurland Microsoft Excel Misc 3 15th Aug 2005 04:10 PM
Calling VB from Excel Ingvar Microsoft Excel Programming 1 10th Oct 2004 11:46 AM
Calling Excel from C++ GL Microsoft Excel Programming 1 9th Aug 2004 09:15 PM
Calling an excel 4.0 macro from vba in Excel 2002 =?Utf-8?B?RGF2ZQ==?= Microsoft Excel Programming 3 7th Apr 2004 01:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:42 PM.