+ Reply to Thread
Results 1 to 9 of 9

Excel Macro lotus notes email clear attached sheet

  1. #1
    Registered User
    Join Date
    05-08-2013
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    17

    Question Excel Macro lotus notes email clear attached sheet

    Good afternoon,

    A quick question.
    I've gotten almost everything to work.
    Just a final step in the macro won't seem to do what I want.

    Hope someone can help out...

    To explain.
    The macro below is a simple macro which when executed checks the excel file and sends out en email when needed.
    With the Excel file as attachment and a string as subject and body of the email.

    There is just one more thing I need the macro to do.

    Which is clear the excel sheet when done.
    I can’t seem to get another part of VBA code inserted into the email part.

    Am I doing something wrong??

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

  2. #2
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Excel Macro lotus notes email clear attached sheet

    Jones , what you mean by clearing the excel file , as in updating/removing something in the excelfile itself ?
    If thats the case , something outside the mailing procedure is what needs to be done.
    If solved remember to mark Thread as solved , to mark your thread as Solved select Thread Tools and click Mark thread as Solved.

    I can't read the mind of my wife so then I get picture but no sound .... and then I mostly get the idea, same goes here picture your outcome and I get the idea.

  3. #3
    Registered User
    Join Date
    05-08-2013
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Excel Macro lotus notes email clear attached sheet

    Hi Hulpeloos...

    That's exactly what I need...

    The filled in Excel form needs to be cleared.
    For people to be able to enter new data and re send the sheet.

    I'm not quite sure how to do the suggested.
    If that’s the case, something outside the mailing procedure is what needs to be done.
    Can I make the macro run sub macro to clear the sheet?

    I'm quite new at VBA I don't know how to link the 2 or make the sub macro run when the sending is done.

    Could you help me a hand???

  4. #4
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Excel Macro lotus notes email clear attached sheet

    Sure alway willing to help a hand.
    In the code you have already for emailing we will add below in bold
    Please Login or Register  to view this content.
    Now go to your excel file and there you insert a new module , in that module you type below
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Excel Macro lotus notes email clear attached sheet

    To make it easier to work between us you can upload the file , be sure to adjust information you do not want to share to some fictional info.

  6. #6
    Registered User
    Join Date
    05-08-2013
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Excel Macro lotus notes email clear attached sheet

    Good afternoon hulpeloos,

    That worked!!!

    But now a new problem arises...
    My bad for not posting the complete Macro.


    The macro runs on the Main macro (See the main_Macro below):

    Which corresponds with one of 4 sub macro's

    When entering the
    Please Login or Register  to view this content.
    in for example for sub macro EmailFile_MADI
    It will clear the data before sub macro EmailFile_MADIV can run.

    I think I need an If statement??

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Excel Macro lotus notes email clear attached sheet

    you can wait to clear the file till the end , so the you place it before the end sub (see bold below)
    now i see that you have an exit sub executed when MADIV is finished , you can remove this (underlined part) since MADIV is last in list anyway.

    Please Login or Register  to view this content.
    side note : the "Else's" you have in your main are not needed either.

  8. #8
    Registered User
    Join Date
    05-08-2013
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Excel Macro lotus notes email clear attached sheet

    HULPELOOS YOU'RE THE BEST!!!

    It works just the way it's supposed to now!!!
    I've been fighting with the code for 2 weeks now...
    The solutions were this easy...

    THANKS FOR YOUR HELP!!!!

  9. #9
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Excel Macro lotus notes email clear attached sheet

    please feel free to mark this as solved.

+ 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. VBA Code: MACRO to send lotus notes email with excel attachment
    By FLani in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2013, 10:23 AM
  2. Excel Macro lotus notes email Select range and paste in subject
    By johnny_w in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-31-2013, 07:27 AM
  3. Macro for email via Lotus Notes.
    By shekar goud in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2010, 10:35 AM
  4. Automation - Send Email via excel sheet and lotus notes
    By IamDBest in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2007, 07:05 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