Sei sulla pagina 1di 1

Private Sub TxtCad_Exit(ByVal Cancel As MSForms.ReturnBoolean) 'Procura pelo cdigo With Worksheets(1).Range("A:A") Set c = .Find(txtCad.

Value, LookIn:=xlValues, LookAt:=xlWhole) 'Se encontrou o registro If Not c Is Nothing Then 'Preenche o nome lblarm.Caption = "Nome: " & Worksheets(1).Cells(c.Row, 2).Value 'Preenche a idade lblref.Caption = "Idade: " & Worksheets(1).Cells(c.Row, 3).Value 'Se no encontrou Else 'Limpa os captions lblarm.Caption = "Armrio:" lblref.Caption = "Referncia" End If

End With End Sub

Potrebbero piacerti anche