Good Night,

I need to create a routine in a service management spreadsheet, where a macro should send an e-mail that is contained in Column "A" with the information contained in all columns for your line. The email will be triggered automatically when the status column "F", which contains the status is changed to "" In analysis "and" Done ".
I have this code below, I tried a number of ways, however without success.

I thank everyone's attention.

USERDATADESCRIPTIONOPENING CLOSED IN ACTION TAKEN THE STATUS No.
[email protected] 02/07/2012 Memory 10/01/2012 17:31 Exchanged for new Done 10003
[email protected] 18/07/2012 keyboard not Fucniona 04/17/2015 00:00 Exchanged for new Done 10004
[email protected] 23/07/2012 Burnt Monitor 4.17.2015 Exchanged for new Done 10005
[email protected] 29/07/2012 Mouse Broken 17.04.2015 Exchanged for new Done 10006


Private Sub Worksheet_Change(ByVal Target As Range)
Dim OutApp As Object
Dim OutMail As Object
Dim texto As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

linha = ActiveCell.Row - 1
If Target.Address = "$F$" & linha Then

If Plan1.Cells(linha, 6) = "Concluído" Then
texto = "Prezado(a) " & Plan1.Cells(linha, 1) & "," & vbCrLf & vbCrLf & _
"A O.S. " & Plan1.Cells(linha, 7) & " aberta em " & _
Plan1.Cells(linha, 2) & " foi concluída." & vbCrLf & _
" Veja informações abaixo:" & vbCrLf & _
" Status: " & Plan1.Cells(linha, 6) & vbCrLf & _
" Ação tomada: " & Plan1.Cells(linha, 5) & vbCrLf & vbCrLf & _
"Atenciosamente," & vbCrLf & _
"Help Desk"
End If

With OutMail
.To = Plan1.Cells(linha, 1)
.CC = ""
.BCC = ""
.Subject = "Título do email"
.Body = texto
.Display 'Utilize Send para enviar o email sem abrir o Outlook
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End If
End Sub