Results 1 to 6 of 6

If-Then-Else Question

Threaded View

  1. #1
    Registered User
    Join Date
    04-17-2012
    Location
    Lancaster, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    8

    If-Then-Else Question

    I have a routine that sends emails when certain criteria are met. This works fine, but I would like it to not send anything if the Days >10. Any thoughts? Thanks for you assistance.
    'Compose message
       
          If Days > 0 Then
          Msg = Recipient & vbCrLf & vbCrLf
          Msg = Msg & "This is a reminder that the "
          Msg = Msg & Document
          Msg = Msg & " is due to be filed in "
          Msg = Msg & Days
          Msg = Msg & " days."
          ElseIf Days < 0 Then
          Msg = Recipient & vbCrLf & vbCrLf
          Msg = Msg & "This is a reminder that the "
          Msg = Msg & Document
          Msg = Msg & " is now overdue and requires immediate attention."
        End If
    Last edited by Paul; 04-18-2012 at 02:45 PM. Reason: Fixed CODE tags to wrap the code.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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