Attribute VB_Name = "MATRIX_RC_VALIDATE_LIBR" Option Explicit 'Requires that all variables to be declared explicitly. Option Base 1 'The "Option Base" statement allows to specify 0 or 1 as the 'default first index of arrays. '************************************************************************************ '************************************************************************************ '© Copyright NicoSystem 2009. All rights reserved by Rafael Nicolas Fermin Cota, 'San Francisco, CA. USA www.rnfc.org 'nfermincota.hba2005@ivey.ca '************************************************************************************ '************************************************************************************ 'FUNCTION : IS_ARRAY_FUNC 'DESCRIPTION : Check if argument is a vector array 'LIBRARY : MATRIX 'GROUP : RC_VALIDATE 'ID : 001 'AUTHOR : RAFAEL NICOLAS FERMIN COTA 'LAST UPDATE : 01/19/2009 '************************************************************************************ '************************************************************************************ Function IS_ARRAY_FUNC(ByRef DATA_RNG As Variant) Dim NSIZE As Long Dim DATA_VECTOR As Variant On Error GoTo ERROR_LABEL DATA_VECTOR = DATA_RNG IS_ARRAY_FUNC = False NSIZE = UBound(DATA_VECTOR, 1) IS_ARRAY_FUNC = True NSIZE = UBound(DATA_VECTOR, 2) IS_ARRAY_FUNC = False Exit Function ERROR_LABEL: End Function '************************************************************************************ '************************************************************************************ '© Copyright NicoSystem 2009. All rights reserved by Rafael Nicolas Fermin Cota, 'San Francisco, CA. USA www.rnfc.org 'nfermincota.hba2005@ivey.ca '************************************************************************************ '************************************************************************************ 'FUNCTION : IS_MATRIX_FUNC 'DESCRIPTION : Check if argument is a matrix array 'LIBRARY : MATRIX 'GROUP : RC_VALIDATE 'ID : 002 'AUTHOR : RAFAEL NICOLAS FERMIN COTA 'LAST UPDATE : 01/19/2009 '************************************************************************************ '************************************************************************************ Function IS_MATRIX_FUNC(ByRef DATA_RNG As Variant) Dim NSIZE As Long Dim DATA_MATRIX As Variant On Error GoTo ERROR_LABEL DATA_MATRIX = DATA_RNG IS_MATRIX_FUNC = False NSIZE = UBound(DATA_MATRIX, 1) NSIZE = UBound(DATA_MATRIX, 2) IS_MATRIX_FUNC = True Exit Function ERROR_LABEL: End Function