Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/09/2011, 15:52
Avatar de PosProdukcion
PosProdukcion
 
Fecha de Ingreso: noviembre-2004
Ubicación: Manzanares el Real (Madrid)
Mensajes: 726
Antigüedad: 19 años, 5 meses
Puntos: 9
Respuesta: Error escurridizo No se encuentra el miembro público 'ifNull' en el tipo '

Está dentro de un módulo, no pertenece a ninguna clase ni es llamada con ningún tipo "e"

Saludos

Código vb:
Ver original
  1. 'ifNull(valor, defaultInteger)
  2.    'Si valor="" devuelve default, sino "valor"
  3.    'Funcion sobrecargada en funcion del tipo de salida: Integer, string, etc.
  4.    Public Function ifNull(ByVal valor As String, ByVal sinulo As Integer) As Integer
  5.         Dim valor1 As Integer
  6.  
  7.         Try
  8.             If valor = "" Then
  9.                 valor1 = sinulo
  10.             Else
  11.                 valor1 = CInt(valor)
  12.             End If
  13.  
  14.             Return valor1
  15.         Catch
  16.             Return sinulo
  17.         End Try
  18.     End Function
  19.  
  20.     'ifNull(valor, defaultString)
  21.    Public Function ifNull(ByVal valor As String, ByVal sinulo As String) As String
  22.         Dim valor1 As String
  23.  
  24.         Try
  25.             If valor = "" Then
  26.                 valor1 = sinulo
  27.             Else
  28.                 valor1 = CStr(valor)
  29.             End If
  30.  
  31.             Return valor1
  32.         Catch
  33.             Return sinulo
  34.         End Try
  35.     End Function