View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Neal Carron[_2_] Neal Carron[_2_] is offline
external usenet poster
 
Posts: 23
Default How do I call Fourier Analysis in Excel2007 in a macro?

Thanks. I tried your example. Still doesn't work. It says:

Run-time error '1004':
Method 'Run' of object '_Application' failed

- Neal

"Dana DeLouis" wrote:

I still get the error msg:


What error message are you getting?

If you have data in A1:A4, and C1:C4 is clear, this small demo works in
Excel 2007.

Sub Demo()
Run "ATPVBAEN.XLAM!FOURIER", Range("A1:A4"), Range("C1"), False, False

End Sub

= = =
HTH
Dana DeLouis



Neal Carron wrote:
Sorry, the last sentence should have read Excel2007, not Excel97.
- Neal

"Neal Carron" wrote:

That doesn't appear to be the problem.
I've cleared the output range, and clearly inserted the input and output
ranges in the FT routine. I still get the error msg:

Application.Run "ATPVBAEN.XLAM!Fourier", , , False, False

And I've saved the file as macro-enabled (*.xlsm).

In direct application (outside the macro) the FT will overwrite existing
data (a dialog box asks if you wish to do so).

So I still don't know how to run a FT in an Excel97 macro.
- Neal

"Dana DeLouis" wrote:

Application.Run "ATPVBAEN.XLAM!Fourier", , , False, False

It appears your macro is missing the input and output range.
Also note that Fourier can not overwrite the output range if the output
range has data. You have to clear the output range before calling this
function.

= = =
HTH
Dana DeLouis



Neal Carron wrote:
A 2005 thread discussed this in earlier versions of Excel, but the methods
don't work in Excel 2007.
I need to do a Fourier Transform in a macro. The macro inserts
Application.Run "ATPVBAEN.XLAM!Fourier", , , False, False

I keep getting errors there, and the macro stops.
Can anyone help?