Attach Excel and Send Mail

Prabhu

New member
Joined
Nov 5, 2013
Messages
8
Reaction score
0
Points
0
Hi Friends,

I have attached a workbook which has many sheet.

My existing macro work if the specified sheet in the Marco exist in the workbook.

suppose if it is not in the workbook then macro gets stooped.

kindly help to modify even if any of the sheet specified in the macro not exist then it should work with the existing sheet.

Regards,
Prabhu
 

Attachments

  • workbook.xlsm
    26 KB · Views: 16
Added a function to your module and used it to check if sheets exist. Commented out some unnecessary lines. You'll need to tidy it up.

Hope this helps.
 

Attachments

  • workbook_1.xlsm
    25.7 KB · Views: 17
Hi Friend,

Thank you! it is working great!

i have one more request,i added the same sheet with fruit names.

while i attach sheet 'banana' in a mail, sheet 'apple' to be pasted in the body of the same mail.

similarly if i attach 'orange' and 'grape' sheet 'jack' to be pasted in the body of the same mail.

is this possible?

Thanks & Regards,

Prabhu
 
Back
Top