error en properties
Buenas ,a ver si alguien me ayuda con el siguiente error que lo logro averiguar:
difinitions of property procedures for the same property are inconsistent, or property procedures have an opcional parameter, parameterarray or invalid set final paramerter
las definiciones son:
Public Property Get CogerElemento(ByVal Índice As Integer) As String
Public Property Let CogerElemento(ByVal Item As String)
No veo el fallo,a ver si alguien lo ve.Gracias.
difinitions of property procedures for the same property are inconsistent, or property procedures have an opcional parameter, parameterarray or invalid set final paramerter
las definiciones son:
Public Property Get CogerElemento(ByVal Índice As Integer) As String
Public Property Let CogerElemento(ByVal Item As String)
No veo el fallo,a ver si alguien lo ve.Gracias.
Public Property Get CogerElemento(ByVal Índice As Integer) As String
Será el acento de (ByVal Índice ??????
Será el acento de (ByVal Índice ??????
Tienes un error de concepto. Al agregar propiedades en una clase, el procedimiento Let establece un valor Indice a la propiedad, en cambio el procedimiento Get, devuelve un valor de esa propiedad.
Deberías esribirlo así:
Public Property Let CogerElemento(Item As String)
'Tus instrucciones
End Property
Public Property Get CogerElemento() As String
'Tus instrucciones
End Property
Saludos!
Bartolom
Chile
Deberías esribirlo así:
Public Property Let CogerElemento(Item As String)
'Tus instrucciones
End Property
Public Property Get CogerElemento() As String
'Tus instrucciones
End Property
Saludos!
Bartolom
Chile
