Good Day,
I am working on a automated handover code to send an mail and all is working perfectly.
I would like to move the active cell to the next sheet after the last row there and then delete the blank row as well.
I have tried different examples from the web but with no luck
I am working on a automated handover code to send an mail and all is working perfectly.
I would like to move the active cell to the next sheet after the last row there and then delete the blank row as well.
I have tried different examples from the web but with no luck
Code:
Sub Handover()
Dim OutApp As Object
Dim OutMail As Object
Dim r As Integer
For r = 2 To 200 'data in rows 2-4
If Not IsEmpty(Sheets("WIP").Cells(r, 19)) Then
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
Dim Msg As String
Dim signature As String
Msg = ""
SigString = "C:\Users\" & Environ("username") & "\AppData\Roaming\Microsoft\Signatures\Auto.htm"
If Dir(SigString) <> "" Then
signature = GetBoiler(SigString)
Else
signature = ""
End If
On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = """
.HTMLbody = Msg & vbNewLine & signature
.display '.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Else
End If
Next r
End Sub