Tech Tip: Calling NAG Routines From ExcelUsers of the NAG Fortran DLLs will know from the supporting documentation and examples that it is perfectly possible to call the NAG routines from Excel. To help with this NAG supplies a set of 'Declare' statements which may be copied and pasted into your VBA module. Typically there are a number of utilities that you might need to write or copy from the NAG examples in order to complete the necessary code. If you have access to the NAG statistical Add-Ins then these functions need not be replicated, simply reference the NAG_Library.xla supplied with the NAG Statistical Add-Ins. To do this obtain the VBA window in Excel from the Tools\Macro\Visual Basic Editor menus. In this Visual Basic Window use the Tools\References menus to establish a reference to NAG_Library.xla. The following functions may be useful:
Public Sub AddNagMenu(NagSubMenu As String) For information on NAG's DLLs please visit http://www.nag.com/numeric/NAGFortranDLLs.asp For specific technical advice in using NAG's products, please contact our technical experts. Return to Technical Tips & Hints index page. |
© Numerical Algorithms Group
Visit NAG on the web at:
www.nag.co.uk (Europe and ROW)
www.nag.com (North America)
www.nag-j.co.jp (Japan)
http://www.nag.com/techtips/techtip023.asp