+ Reply to Thread
Results 1 to 7 of 7

Problem copying cells into email

  1. #1
    Registered User
    Join Date
    07-10-2014
    Location
    chicago
    MS-Off Ver
    2010
    Posts
    15

    Problem copying cells into email

    Having a little problem copying cells into the body of my email. Found a nice looking code by Ken Puls and modified it for my situation. The problem I have now is it says that I get an Argument is not Optional error with the email.

    Goal - to generate an email every time my target value is greater than 200 and add certain cells of information to that email and to have it email out to the email address in column X. I feel this should work just cannot figure out where code is not optional. Any help would be great.


    I'm using excel 2010 and outlook.

    First code is change event second is email.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Problem copying cells into email

    the "If IsNumeric(target.Value) And target.Value > 200 Then Call Send_Selected_Mail_Only"

    Send_Selected_Mail_Only requires a argument....see the beginning of the SUB C1 as range....
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Registered User
    Join Date
    07-10-2014
    Location
    chicago
    MS-Off Ver
    2010
    Posts
    15

    Re: Problem copying cells into email

    Sorry but I am a true novice, have no real knowledge when it comes to doing more complex codes like this. Is the issue that the (target.Value) and (cl As Range) are not compatible? If so do I need to start over? Again sorry I'm not more knowledgeable on this subject and thanks for the help.

  4. #4
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Problem copying cells into email

    not a problem.....and yes and no

    yes, the problem is that target.value is the value of a cell and the SUB parameter is looking for a RANGE
    without having data I can only "guess" at the code but this might work

    Please Login or Register  to view this content.
    OR

    Please Login or Register  to view this content.
    no, you don't have to start over...

    hope this helps

  5. #5
    Registered User
    Join Date
    07-10-2014
    Location
    chicago
    MS-Off Ver
    2010
    Posts
    15

    Re: Problem copying cells into email

    Thanks again that seemed to fix that issue though now the with cl.parent line is giving an object error. I'm not sure what this command even does. Sorry to continue to ask for help.

  6. #6
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Problem copying cells into email

    is it possible to upload a sample of the file....of course, remove any confidential data.....it's a lot easier than me just guessing....if possible....thanks

  7. #7
    Registered User
    Join Date
    07-10-2014
    Location
    chicago
    MS-Off Ver
    2010
    Posts
    15

    Re: Problem copying cells into email

    Here is a copy of the log I'm using. Hopefully there is enough information there. Thanks.
    Last edited by waratdenison; 09-02-2014 at 03:47 PM.

+ 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] For-loop problem in copying of cells
    By desolatori in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2014, 10:16 AM
  2. Not copying over format of cells to email
    By gujugolf in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2013, 02:37 PM
  3. problem with copying cells
    By arnab0711 in forum Excel General
    Replies: 3
    Last Post: 05-23-2012, 05:35 AM
  4. Replies: 1
    Last Post: 07-15-2011, 05:29 PM
  5. Replies: 11
    Last Post: 10-31-2010, 12:24 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