Selelcionar en un Texbox, para poderlo modificar
Cuando en el List Box seleecciono una dato, quiero moverlos a un Texbox para poder hacer los cambio, dejo mi ejemplo para que me puedas ayudar a modificar este paso. Dejo código:
Private Sub CommandButton1_Click()
If Me.Lista.ListIndex < 0 Then
MsgBox "No se ha elegido ningún registro", vbExclamation, "EXCELeINFO"
Else
Modificar.Show
End If
End Sub
Private Sub Fecha_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
Select Case Len(Fecha.Value)
'len = largo o longit
Case 2
'si el textbox tiene 2 caracteres
Fecha.Value = Fecha.Value & "/"
'se colocará automáticamente una "/" luego del segundo caracter
Case 5
'si el textbox tiene 5 caracteres
Fecha.Value = Fecha.Value & "/"
'se colocará automáticamente una "/" luego del quinto caracter
End Select
End Sub
Private Sub Lista_Click()
Range("b5").Activate
Cuenta = Me.Lista.ListCount
For i = 0 To Cuenta - 1
If Me.Lista.Selected(i) Then
'MsgBox Me.ListBox1.List(i)
Valor = Me.Lista.List(i)
Sheets("Inventario").Range("b5:b23").Find(What:=Valor, LookAt:=xlWhole, After:=ActiveCell).Activate
End If
Next i
End Sub