Ver Mensaje Individual
  #4 (permalink)  
Antiguo 22/04/2008, 08:05
Avatar de David
David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 20 años
Puntos: 839
Re: ayuda con usercontrol

Cita:
Iniciado por Mauriten53 Ver Mensaje
David, este es el codigo de usercontrol

Código:
Private Sub UserControl_Initialize()
 
    cbTipo.AddItem "DNI"
    cbTipo.AddItem "L.E"
    cbTipo.AddItem "L.CIVICA"
 
End Sub
 
 
Public Property Get Tipo() As String
    Tipo = cbTipo.Text
End Property
 
Public Property Get DNI() As String
    DNI = txtDNI.Text
End Property
El "Tipo de documento" está en un combobox y el "DNI" se ingresa en un textbox.
Pues, para que funcione el código que colocaste al principio también debes permitir que se modifique la propiedad. Así:
Código:
 
Public Property Let Tipo(ByVal New_Value As String)
    cbTipo.Text = New_Value
End Property
Public Property Let DNI(ByVal New_Value As String)
    txtDNI.Text = New_Value
End Property
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.