Re: Array Declaration Problem ??

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Dana;

I couldn't access the link, but it most likely refers to my other post!
Your idea is excellent and NEW.
I selected the vba ref atpvbaen.xls and tried your demo (copy/paste).
It produces Run-time error '438': Object doesn't support this property or
method"
and the statement: c = .Complex(3, 4) is highlighted.

Is there something else beside the ref. atpvbaen.xls ?? (I'm using XL 2003,
Win XP)

Regards.


"Dana DeLouis" wrote:

As a side note, I noticed in the thread at:

http://www.mrexcel.com/forum/printthread.php?s=5450aaf5a5033dc8769d9015ff0
5c420&t=322333

that near the end of the thread they mention it was not possible to
translate the Fortran version directly because vba can not use Complex
functions.
Well, that's not entirely true.
If one sets a vba reference to atpvbaen, then it is possible to do stuff
like this.
This returns the correct answer of 5.

Sub Demo()
Dim c As String

With WorksheetFunction
c = .Complex(3, 4)
MsgBox .ImAbs(c)
End With
End Sub

--
HTH :>)
Dana DeLouis


"Dana DeLouis" <ddelouis@xxxxxxxxxxxxx> wrote in message
news:E7C7B7FD-DE74-48D0-B361-25E6B2333BF1@xxxxxxxxxxxxxxxx
Hi. I think I've copied your code & data correctly, but I keep getting
the message ""Too many iterations..."
and them the program aborts near the end with Atan2(0,0) (thus
causing an error)

Feel free to send my your workbook. I'd be glad to take a look at it.
Do you have a reference for the code?
--

Dana DeLouis

<snip>

.


Quantcast