Hi,
I have just finished writing my ErrorLogger Class, the Main Method in the Function takes 3 Parameters, but when I try to call this from a function, I getan Type Mismatch Error.
the Declaration of the Method in the Class is as follows
and in the function I have the following code to call this Class Method
After taking out each parameter the problem stops as soon as I remove objError, does anyone know anyway I can get this to work without having to pass every value from the Error object as individual variables
Thanks,
Gavin,
I have just finished writing my ErrorLogger Class, the Main Method in the Function takes 3 Parameters, but when I try to call this from a function, I getan Type Mismatch Error.
the Declaration of the Method in the Class is as follows
Code:
Public Function LogError(ByVal objError As Error, ByVal strProcName As String, ByVal strUserInput As String)
' Summary : function that logs error to table or file
' History : [Gavin Blackford] 22/03/2006 Created
'------------------------------------------------------------------------
Select Case OutputType
Case 1 ' Error table
Call LogTable(objError, strProcName, Nz(strUserInput, ""))
Case 2 ' Error File
Call LogFile(objError, strProcName, Nz(strUserInput, ""))
Case 3 ' Both
Call LogTable(objError, strProcName, Nz(strUserInput, ""))
Call LogFile(objError, strProcName, Nz(strUserInput, ""))
End Select
End Function
and in the function I have the following code to call this Class Method
Code:
Set objErrors = New clsERRErrors
objErrors.OutputType = ErrorLogTable
Call objErrors.LogError(objError, strProcName, varParams(4))
After taking out each parameter the problem stops as soon as I remove objError, does anyone know anyway I can get this to work without having to pass every value from the Error object as individual variables
Thanks,
Gavin,