ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   FFT usage in Macro (https://www.excelbanter.com/excel-programming/325785-fft-usage-macro.html)

bandy2000

FFT usage in Macro
 
hi,

How can I use the FFT Add In in a Macro?
How can I use the Engineering Functions in a Macro?
Maybe someone can provide short example codings
Thanks

Chip Pearson

FFT usage in Macro
 
If you are talking about the functions in the Analysis Tool Pack,
you need to set a reference to the ATP VBA add-in. In Excel, go
to the Tools menu, choose Add-Ins, and select "Analysis Tool Pak
VBA" from the list and put a check next to it. Then, go to the
VBA Editor, choose the Tools menu, then References. In that
dialog, put a check next to "ATPVBAEN.xla". Once you do this,
you can use the ATP functions as if they were built in VBA
functions.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"bandy2000" wrote in
message
...
hi,

How can I use the FFT Add In in a Macro?
How can I use the Engineering Functions in a Macro?
Maybe someone can provide short example codings
Thanks




ross

FFT usage in Macro
 
I don't kno what fuction you are talking about but

try perfixing the fuctoion with "worksheetfunction"

from excel help!

Set myRange = Worksheets("Sheet1").Range("A1:C10")
answer = Application.WorksheetFunction.Min(myRange)
MsgBox answer

bandy2000

FFT usage in Macro
 
HI,
Thanks for the info. I did what you told to do. Then I used the Macro
Recorder and it came out to use the FFT like this:

Application.Run "ATPVBAEN.XLA!Fourier", , "ResultFFT", False , False

Where do I find further information on the options for the Fourier Function.
There is nothing in the Help Infromation in VBA or at least I can't find it.
For Example where do I enter the Range etc....

"Chip Pearson" wrote:

If you are talking about the functions in the Analysis Tool Pack,
you need to set a reference to the ATP VBA add-in. In Excel, go
to the Tools menu, choose Add-Ins, and select "Analysis Tool Pak
VBA" from the list and put a check next to it. Then, go to the
VBA Editor, choose the Tools menu, then References. In that
dialog, put a check next to "ATPVBAEN.xla". Once you do this,
you can use the ATP functions as if they were built in VBA
functions.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"bandy2000" wrote in
message
...
hi,

How can I use the FFT Add In in a Macro?
How can I use the Engineering Functions in a Macro?
Maybe someone can provide short example codings
Thanks





Tom Ogilvy

FFT usage in Macro
 
it is defined in the xl4 macro help file:


http://support.microsoft.com/?id=143466
xlmacr8.hlp
http://support.microsoft.com/?id=128185
macrofun.exe

--
Regards,
Tom Ogilvy

"bandy2000" wrote in message
...
HI,
Thanks for the info. I did what you told to do. Then I used the Macro
Recorder and it came out to use the FFT like this:

Application.Run "ATPVBAEN.XLA!Fourier", , "ResultFFT", False , False

Where do I find further information on the options for the Fourier

Function.
There is nothing in the Help Infromation in VBA or at least I can't find

it.
For Example where do I enter the Range etc....

"Chip Pearson" wrote:

If you are talking about the functions in the Analysis Tool Pack,
you need to set a reference to the ATP VBA add-in. In Excel, go
to the Tools menu, choose Add-Ins, and select "Analysis Tool Pak
VBA" from the list and put a check next to it. Then, go to the
VBA Editor, choose the Tools menu, then References. In that
dialog, put a check next to "ATPVBAEN.xla". Once you do this,
you can use the ATP functions as if they were built in VBA
functions.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"bandy2000" wrote in
message
...
hi,

How can I use the FFT Add In in a Macro?
How can I use the Engineering Functions in a Macro?
Maybe someone can provide short example codings
Thanks







bandy2000

FFT usage in Macro
 
Thanks again Tom,

exactly what I wanted to have!!
At the moment I'm using these files as "Standalone" is it possible to invoke
them into the standard Excel / VBA help?


"Tom Ogilvy" wrote:

it is defined in the xl4 macro help file:


http://support.microsoft.com/?id=143466
xlmacr8.hlp
http://support.microsoft.com/?id=128185
macrofun.exe

--
Regards,
Tom Ogilvy

"bandy2000" wrote in message
...
HI,
Thanks for the info. I did what you told to do. Then I used the Macro
Recorder and it came out to use the FFT like this:

Application.Run "ATPVBAEN.XLA!Fourier", , "ResultFFT", False , False

Where do I find further information on the options for the Fourier

Function.
There is nothing in the Help Infromation in VBA or at least I can't find

it.
For Example where do I enter the Range etc....

"Chip Pearson" wrote:

If you are talking about the functions in the Analysis Tool Pack,
you need to set a reference to the ATP VBA add-in. In Excel, go
to the Tools menu, choose Add-Ins, and select "Analysis Tool Pak
VBA" from the list and put a check next to it. Then, go to the
VBA Editor, choose the Tools menu, then References. In that
dialog, put a check next to "ATPVBAEN.xla". Once you do this,
you can use the ATP functions as if they were built in VBA
functions.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"bandy2000" wrote in
message
...
hi,

How can I use the FFT Add In in a Macro?
How can I use the Engineering Functions in a Macro?
Maybe someone can provide short example codings
Thanks







Tom Ogilvy

FFT usage in Macro
 
I think there is an xl2000 version of them - but I recall Myrna Larson
saying something about a problem with these - perhaps it was that they don't
work (at least not integrated like you ask) on other versions. . . . I
found one

Here is one posting; (it also has the link to the xl2000 version)

Hi, Tom:

For your first suggestion, have they updated this EXE file so it will
install
under Excel XP and/or Excel 2003? When I tried a year or so ago, it required
XL2000 to be installed. I finally got the folks in the MVP section to
persuade
the development team to send me a copy of the embedded CHM file.

Myrna Larson


On Thu, 9 Sep 2004 16:44:54 -0400, "Tom Ogilvy" wrote:

http://office.microsoft.com/downloads/2000/Xlmacro.aspx

http://support.microsoft.com/default...85&Product=xlw
Macrofun.exe File Available on Online Services
xl97 (old winhelp format)

http://support.microsoft.com/default...66&Product=xlw
XL97: Macro97.exe File Available on Online Services
xl97 (old winhelp format)


--
Regards,
Tom Ogilvy



"bandy2000" wrote in message
...
Thanks again Tom,

exactly what I wanted to have!!
At the moment I'm using these files as "Standalone" is it possible to

invoke
them into the standard Excel / VBA help?


"Tom Ogilvy" wrote:

it is defined in the xl4 macro help file:


http://support.microsoft.com/?id=143466
xlmacr8.hlp
http://support.microsoft.com/?id=128185
macrofun.exe

--
Regards,
Tom Ogilvy

"bandy2000" wrote in message
...
HI,
Thanks for the info. I did what you told to do. Then I used the Macro
Recorder and it came out to use the FFT like this:

Application.Run "ATPVBAEN.XLA!Fourier", , "ResultFFT", False , False

Where do I find further information on the options for the Fourier

Function.
There is nothing in the Help Infromation in VBA or at least I can't

find
it.
For Example where do I enter the Range etc....

"Chip Pearson" wrote:

If you are talking about the functions in the Analysis Tool Pack,
you need to set a reference to the ATP VBA add-in. In Excel, go
to the Tools menu, choose Add-Ins, and select "Analysis Tool Pak
VBA" from the list and put a check next to it. Then, go to the
VBA Editor, choose the Tools menu, then References. In that
dialog, put a check next to "ATPVBAEN.xla". Once you do this,
you can use the ATP functions as if they were built in VBA
functions.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"bandy2000" wrote in
message
...
hi,

How can I use the FFT Add In in a Macro?
How can I use the Engineering Functions in a Macro?
Maybe someone can provide short example codings
Thanks









Dana DeLouis[_3_]

FFT usage in Macro
 
One of the easiest ways would be to go to the vba editor, and select Tools |
References | and select "atpvbaen.xls."
Then you can write code along this line...

Sub Demo()
Dim c
c = complex(3, 4)
Debug.Print c
Debug.Print ImAbs(c)

'// Fourier is a Subroutine
'// Use Ranges for Input / Output
Fourier [A1:A8], [B1:B8], False, False
End Sub

which prints:

3+4i
5


If you don't wish to set a vba library reference, here is another option. I
added some ideas that I use...

Sub Demo()
Const InverseFFT As Boolean = True
Const ForwardFFT As Boolean = False

Const NoLabels As Boolean = False
Const Labels As Boolean = True

Const FFT As String = "ATPVBAEN.XLA!Fourier"

Run FFT, _
ActiveSheet.Range("A1:A8"), _
ActiveSheet.Range("B1"), _
ForwardFFT, _
NoLabels

End Sub


HTH :)
--
Dana DeLouis
Win XP & Office 2003


"bandy2000" wrote in message
...
hi,

How can I use the FFT Add In in a Macro?
How can I use the Engineering Functions in a Macro?
Maybe someone can provide short example codings
Thanks





All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com