Desculpe Alyson, devido aos custos estou aprendendo VBA via Youtube, por isso a minha dificuldade. tá dando erro na execução nesse comando.
valor_processo = Txt_Processo_Aud.Value
ult_linha = Worksheets("Plan6").Cells(rowns.Count, "A").End(xlUp).Row
ult_linha = Range("A30000").End(xlUp).Row
For linha = 2 To ult_linha
If Worksheets("Plan6").Cells(linha, 18).Value = valor_processo Then
Worksheets("Plan6").Range(Worksheets("Plan6").Cells(linha, 1), Worksheets("Plan6").Cells(linha, 42)).Delete Shift:=xlUp
linha = linha - 1
End If
If Cells(linha, 18).Value = valor_processo Then
Range(Cells(linha, 1), Cells(linha, 42)).Delete Shift:=xlUp
linha = linha - 1
End If
ActiveWorkbook.Save
MsgBox "Cadastro do cliente " & Me.Txt_Cliente_Aud & " foi EXCLUIDO com sucesso!", vbInformation, "Excluído!"
Unload Audiência
Exit Sub
Next
Erro:
MsgBox "Erro!", vbCritical, "ERRO"
End Sub
Valeu pelo Basole pelo seu retorno também, mas a excução também parou no:
Plan6.Range(Cells(rng.Row, 1), Cells(rng.Row, 42)).Delete Shift:=xlUp
Gostaria muito se pudesse enviar o arquivo, ficaria muito mais fácil de você posicionarem. albinito10@gmail.com