Private Sub Botao_PesquisaCarga_Click()
Dim lin As Integer
Dim carga As String
lin = 3
carga = CBNumCarga.Value
If carga <> Empty Then
Do Until ThisWorkbook.Sheets("Viagens").Cells(lin, 1) = Empty
If ThisWorkbook.Sheets("Viagens").Cells(lin, 4).Value = carga Then
CBNomeMotorista.Value = ThisWorkbook.Sheets("Viagens").Cells(lin, 2).Value
CBPlaca.Value = ThisWorkbook.Sheets("Viagens").Cells(lin, 3).Value
TxtNumCarga.Value = ThisWorkbook.Sheets("Viagens").Cells(lin, 4).Value
TxtVCarga.Value = ThisWorkbook.Sheets("Viagens").Cells(lin, 5).Value
TxtDtCarrega.Value = ThisWorkbook.Sheets("Viagens").Cells(lin, 6).Value
TxtDtSaida.Value = ThisWorkbook.Sheets("Viagens").Cells(lin, 7).Value
TxtDtChegada.Value = ThisWorkbook.Sheets("Viagens").Cells(lin, 8).Value
TxtKmRodado.Value = ThisWorkbook.Sheets("Viagens").Cells(lin, 9).Value
CBCidades.Value = ThisWorkbook.Sheets("Viagens").Cells(lin, 10).Value
CBUf.Value = ThisWorkbook.Sheets("Viagens").Cells(lin, 11).Value
TxtDespesas.Value = ThisWorkbook.Sheets("Viagens").Cells(lin, 12).Value
TxtQtdEntregas.Value = ThisWorkbook.Sheets("Viagens").Cells(lin, 13).Value
Exit Do
End If
lin = lin + 1
Loop
essa é minha pequisa, estou usando um loop