Private Sub LOCALIZAR_Click()
Dim localing As String
Range("A2").Select
While ActiveCell <> ""
If ActiveCell = TextMATRICULA.Text Then ' a caixa de texto onde vai fazer a procura
TextDATA.Text = ActiveCell.Offset(0, 1).Value
TextHORA.Text = Format(ActiveCell.Offset(0, 2).Value, "Long Time")
TextNOME.Text = ActiveCell.Offset(0, 3).Value
ComboSEXO.Text = ActiveCell.Offset(0, 4).Value
TextIDADE.Text = ActiveCell.Offset(0, 5).Value
ComboCARGO.Text = ActiveCell.Offset(0, 6).Value
TextRG.Text = ActiveCell.Offset(0, 7).Value
TextCPF.Text = ActiveCell.Offset(0, 8).Value
TextENDERECO.Text = ActiveCell.Offset(0, 9).Value
TextNUM.Text = ActiveCell.Offset(0, 10).Value
TextCOMPLEMENTO.Text = ActiveCell.Offset(0, 11).Value
ComboBAIRRO.Text = ActiveCell.Offset(0, 12).Value
TextCEP.Text = ActiveCell.Offset(0, 13).Value
TextPONTOREF.Text = ActiveCell.Offset(0, 14).Value
TextTELFIXO1.Text = ActiveCell.Offset(0, 15).Value
TextTELFIXO2.Text = ActiveCell.Offset(0, 16).Value
TextCELULAR1.Text = ActiveCell.Offset(0, 17).Value
TextCELULAR2.Text = ActiveCell.Offset(0, 18).Value
TextWHATSAPP.Text = ActiveCell.Offset(0, 19).Value
TextEMAIL.Text = ActiveCell.Offset(0, 20).Value
TextENDIMG.Text = ActiveCell.Offset(0, 21).Value
End If
ActiveCell.Offset(1, 0).Activate
Wend
End Sub
Postado : 25/08/2018 5:46 pm