Results 1 to 2 of 2

Thread: VBA Code Error

  1. #1
    Member
    Join Date
    Aug 2011
    Posts
    54
    Rep Power
    14

    VBA Code Error

    Hi,

    could anyone help me why the attached excel vba is not working.
    Attached Files Attached Files

  2. #2
    Member
    Join Date
    May 2013
    Posts
    31
    Rep Power
    0
    I don't see an error or "not working" using Display to test rather than Send. For your test emails in A2, the Like is not matched.

    While you could use InStr() to test for the "@" character, this simple Like might suffice.
    Code:
            If sh.Range("A2").Value Like "*@*.*" Then

Similar Threads

  1. Replies: 8
    Last Post: 09-01-2015, 01:50 AM
  2. Replies: 2
    Last Post: 04-10-2015, 04:18 PM
  3. Excel VBA Run-time error '13' Type mismatch
    By mackypogi in forum Excel Help
    Replies: 5
    Last Post: 09-17-2013, 11:16 AM
  4. Shorten VBA Code By Removing Redundant Superfluous Code
    By paul_pearson in forum Excel Help
    Replies: 2
    Last Post: 08-15-2013, 09:09 PM
  5. Export outlook emails to Excel code Error
    By jamilm in forum Outlook Help
    Replies: 2
    Last Post: 02-22-2013, 03:48 PM

Posting Permissions

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