Results 1 to 3 of 3

Highlight cells before checking if the cell is empty & send email

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-12-2018
    Location
    Clearwater, FL
    MS-Off Ver
    MS 365
    Posts
    217

    Highlight cells before checking if the cell is empty & send email

    I have the following macro run when I click on a button.
    Option Explicit
    Sub DontRunUtil_Override()
        With Worksheets("TSA Request") 'Change CodeName to suit
            If IsEmpty(.Range("F31")) Then
                MsgBox "Missing Local or IF Type", vbCritical
                Application.Goto .Range("F31")
            ElseIf IsEmpty(.Range("F17")) Then
                MsgBox "Missing Location", vbCritical
                Application.Goto .Range("F17")
            ElseIf IsEmpty(.Range("F20")) Then
                MsgBox "Missing Customer's Name", vbCritical
                Application.Goto .Range("F20")
            ElseIf IsEmpty(.Range("F4")) Then
                MsgBox "Missing Customer's ID Number", vbCritical
                Application.Goto .Range("F4")
            ElseIf IsEmpty(.Range("F5")) Then
                MsgBox "Missing Customer's Order Number", vbCritical
                Application.Goto .Range("F5")
            ElseIf IsEmpty(.Range("F6")) Then
                MsgBox "Missing Container Number", vbCritical
                Application.Goto .Range("F6")
            ElseIf IsEmpty(.Range("F9")) Then
                MsgBox "Missing To Address", vbCritical
                Application.Goto .Range("F9")
            ElseIf IsEmpty(.Range("F10")) Then
                MsgBox "Missing From Address", vbCritical
                Application.Goto .Range("F10")
            ElseIf IsEmpty(.Range("F7")) Then
                MsgBox "Missing Type of Service Requested", vbCritical
                Application.Goto .Range("F7")
            ElseIf IsEmpty(.Range("F8")) Then
                MsgBox "Missing Date Requested", vbCritical
                Application.Goto .Range("F8")
                
          Else
               Run "Module6.Mail_Sheet_Outlook_Body"
            End If
        End With
            
    End Sub
    I would like when i click on the button for it to highlight those cells to inform the agent which cells need to have data in it and if it is all filled out properly then run this macro. Any help would be greatly appreciated - I have included my workbook for any assistance you can provide!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Checking For Empty Cells
    By ALEXJM in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2017, 03:58 PM
  2. Excel to send email to two addresses in two cells? MSG box upon send?
    By sdyer02 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-15-2016, 08:22 PM
  3. Workflow with signatures (if cell=x then send email, if signed then send email)
    By Kate2811 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2014, 05:37 AM
  4. Replies: 6
    Last Post: 12-02-2011, 02:14 PM
  5. Checking empty cells
    By Diez in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2006, 03:35 AM
  6. [SOLVED] send email with email addresses in a range of cells
    By Craig in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-10-2005, 05:05 PM
  7. [SOLVED] Checking for empty cells in a range
    By Chris Strug in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM

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