+ Reply to Thread
Results 1 to 2 of 2

Error 424 - Objective required

  1. #1
    Registered User
    Join Date
    09-03-2014
    Location
    Rio de Janeiro, Brazil
    MS-Off Ver
    2010
    Posts
    1

    Error 424 - Objective required

    Dears,

    I need your help to solve this issue..I´m trying to send e-mails behalf VBA, but the excel is returning with an error message (Run Time error, 424. Objetive required). Below you can find the macro,

    Sub Emailsférias()

    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 = "$R$" & linha Then

    If Sheet1.Cells(linha, 18) = "Falta Aprovação" Then
    texto = "Prezado(a) " & Sheet1.Cells(linha, 4) & "," & vbCrLf & vbCrLf & _
    "Identificamos que suas férias já foram lançadas, mas até o momento não houve aprovação. Pedimos" & vbCrLf & _
    "gentilmente que verifique as informações abaixo a fim de obter a aprovação do seu Gestor dentro do" & vbCrLf & _
    "prazo estipulado correto." & vbCrLf & vbCrLf & _
    "Saldo de férias: " & Sheet1.Cells(linha, 10) & vbCrLf & vbCrLf & _
    "Período de gozo: " & Sheet1.Cells(linha, 14) & " a " & Sheet1.Cells(linha, 14) & "," & vbCrLf & vbCrLf & _
    "Data limite aprovação: " & Sheet1.Cells(linha, 11) & vbCrLf & vbCrLf & _
    "Link do Portal RH - http://portalrh.chevron.com/forms/frmservlet?config=portalrh" & vbCrLf & vbCrLf & _
    "Obs: Férias não aprovadas dentro do prazo poderão ser canceladas" & vbCrLf & vbCrLf & _
    "Atenciosamente," & vbCrLf & vbCrLf & _
    "HR Employee Relations"
    End If

    With OutMail
    .To = Sheet1.Cells(linha, 3)
    .CC = "[email protected]"
    .BCC = ""
    .Subject = "Férias Pendentes de aprovação"
    .Body = texto
    .Send
    End With
    On Error GoTo 0
    Set OutMail = Nothing
    Set OutApp = Nothing
    End If


    End Sub


    Please, help me! tks in advance,

    Neivaldo

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Error 424 - Objective required

    Target is nothing.

    When do you want this code to run and what row should the data come from?
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] using solver to set objective to value of another cell
    By will.girling in forum Excel General
    Replies: 2
    Last Post: 11-26-2013, 10:00 AM
  2. Creating Objective Type Test
    By anwitha in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2012, 08:32 AM
  3. [SOLVED] How do I write up a controllers objective
    By click in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-15-2006, 04:40 PM
  4. Objective/Goal Tracing
    By FireGeek822 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2005, 04:05 PM
  5. [SOLVED] Percent of Objective
    By [email protected] in forum Excel General
    Replies: 1
    Last Post: 03-15-2005, 05:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1