Email macro

wilkisa

Well-known Member
Joined
Apr 7, 2002
Messages
660
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
My user has the following macro:

Sub Email_1st()
' Clear out any old data on Report

Application.Dialogs(xlDialogSendMail).Show _
arg1:=Array("some.user@company.com"), _
arg2:="Certificate of Appreciation"
ActiveWorkbook.Close

Call Print_Certificate
End Sub


He wants to send only the active sheet instead of the whole workbook. Can someone help me modify this code?

Thanks,
Shirlene
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Yes, VOG, thanks. I had already looked at that and it just confuses me even more. Can you guide me?
 
Upvote 0
Yes, on reflection it is a bit over complicated for what you want. :eeek:

Does this work?

Rich (BB code):
Sub Email_1st()
' Clear out any old data on Report
ActiveSheet.Copy
Application.Dialogs(xlDialogSendMail).Show _
arg1:=Array("some.user@company.com"), _
arg2:="Certificate of Appreciation"
ActiveWorkbook.Close False

Call Print_Certificate
End Sub
 
Upvote 0
Yes, that will give me just the sheet I want. Now I'll try to get it to give me just the print area and change the sheet name from Book1 so if I get stuck, I'll write back.

Thanks so much. Ron's site is a wealth of information but I sometimes get overwhelmed by it.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,282
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top