NAG Logo
Numerical Algorithms Group

Visual Basic 6 Declarations for the NAG C Library

Support files for Visual Basic 6 (VB6) and Visual Basic for Applications (VBA) may be found in this zip file. These files can be used in both VB6 (and earlier) and VBA code. Separate Visual Basic .NET skeletons are available.

For each user-callable NAG C Library function there is a file called <function name>_skeleton.bas which contains the VB declaration of the C function and all Enum and Type declarations necessary for the parameters (mandatory and optional). This file can be imported into your VB or VBA project. If more than one NAG C Library function is called, more than one skeleton may be imported, but multiple declarations must be deleted. In the case of closely related functions it may be easier to import one skeleton in its entirety and only paste the declaration of the second and subsequent functions.

The skeleton files are based on the stand-alone version of the NAG C Library DLL (CLDLL084Z_nag.dll); to specify the version of the DLL which uses the MKL BLAS/LAPACK instead (CLDLL084Z_mkl.dll), replace CLDLL084Z_nag.dll by CLDLL084Z_mkl.dll in the Function or Sub declaration.

The file nag_errlist.bas contains VB code setting the value of all NAG C Library error codes. This file can be imported into your VB project.

These support files use the VB option to base arrays at one, i.e.

Option Base 1
All the examples use this convention.

Note: Regardless of this option, arrays within User Defined Types (UDT) have a base of 0, unless explicitly declared to be 1, e.g.

Dim X(1 To 5) As Double

Remember also that to be able to use the NAG C Library DLL, its location will need to appear somewhere in your current path. If the DLL is in C:\Program Files\NAG\CL08\cldll084zl\bin (for example), then your PATH environment variable must contain this folder before starting Visual Basic. If you are using the MKL-based version of the NAG C Library (CLDLL084Z_mkl.dll), then the folder containing the MKL DLLs should also be on your path, but should appear later in the path than the bin folder for the NAG C Library DLLs, e.g.

C:\Program Files\NAG\CL08\cldll084zl\bin;C:\Program Files\NAG\CL08\
cldll084zl\MKL_ia32_8.0\bin;<rest of path>
© The Numerical Algorithms Group 2008
Privacy Policy | Trademarks

© 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.co.uk/numeric/CL/classocinfo/VB6_skeletons/README.asp