+ Reply to Thread
Results 1 to 3 of 3

VBA Code Help - If text found, send email to corresponding address.

  1. #1
    Registered User
    Join Date
    07-16-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010
    Posts
    8

    VBA Code Help - If text found, send email to corresponding address.

    I'm trying to save and attach the active workbook to an email if certain keywords are found. I'm getting the error message "Duplicate Declaration in Current Scope" and it highlights the line of code:

    Please Login or Register  to view this content.
    Can anyone see what I'm doing wrong? Below is my full code.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: VBA Code Help - If text found, send email to corresponding address.

    For once the error message is very descriptive of the problem it diagnoses, in that you have repeated your declarations - only declare variables once.

  3. #3
    Registered User
    Join Date
    07-16-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: VBA Code Help - If text found, send email to corresponding address.

    That was easy. Thanks a lot.

+ 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. Code to send an e-mail. Don't send if attachment not found
    By thedon_1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2012, 05:41 PM
  2. Replies: 1
    Last Post: 03-08-2012, 01:57 PM
  3. Replies: 6
    Last Post: 12-02-2011, 02:14 PM
  4. VBA code to look up email address and send worksheet
    By JSB0009 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-14-2010, 10:29 AM
  5. send email from XL list of email address
    By pauluk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2009, 11:36 AM

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