probably a simple answer.....

chearn

New Member
Joined
Jan 24, 2005
Messages
14
that I cannot figure out.

Is there a way that you can email a wkshhet within a workbook without sending the entire workbook (and not saving to a seperate workbook)?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
version of excel

what version of excel do you have
i know it is possible
I do it from work but am not there right not to tell you how
 
Upvote 0
Hello, welcome to the board!

Well, yes - and no. You have to save it, but you can delete it right afterwards. Assuming you are using Outlook ...

<font face=Tahoma New><SPAN style="color:#00007F">Option</SPAN> <SPAN style="color:#00007F">Explicit</SPAN>

<SPAN style="color:#00007F">Sub</SPAN> SendActiveSheetOnly()

    <SPAN style="color:#00007F">Dim</SPAN> ws <SPAN style="color:#00007F">As</SPAN> Worksheet, wsTmp <SPAN style="color:#00007F">As</SPAN> Worksheet
    <SPAN style="color:#00007F">Dim</SPAN> OLApp <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Object</SPAN>, OLMsg <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Object</SPAN>
    <SPAN style="color:#00007F">Dim</SPAN> TmpPath <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>
    
    <SPAN style="color:#00007F">If</SPAN> ActiveWorkbook <SPAN style="color:#00007F">Is</SPAN> <SPAN style="color:#00007F">Nothing</SPAN> <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
    <SPAN style="color:#00007F">If</SPAN> MsgBox("Are you sure you want to send the ActiveWorksheet?", vbYesNo, "Send Email") = vbNo <SPAN style="color:#00007F">Then</SPAN> <SPAN style="color:#00007F">Exit</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
        
    Application.ScreenUpdating = <SPAN style="color:#00007F">False</SPAN>
    TmpPath = "C:\Temp.xls"
    ActiveSheet.Copy
    <SPAN style="color:#00007F">Set</SPAN> wsTmp = ActiveSheet
    wsTmp.SaveAs TmpPath
    <SPAN style="color:#00007F">Set</SPAN> OLApp = CreateObject("Outlook.Application")
    <SPAN style="color:#00007F">Set</SPAN> OLMsg = OLApp.CreateItem(0)
    
    <SPAN style="color:#00007F">With</SPAN> OLMsg
        .To = "to.someone@domain.com"
        <SPAN style="color:#007F00">'.Cc = ""</SPAN>
        <SPAN style="color:#007F00">'.Bcc = ""</SPAN>
        .Subject = "<SPAN style="color:#00007F">Sub</SPAN>ject here"
        .Attachments.Add TmpPath
        .Display
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
    
    Application.ScreenUpdating = <SPAN style="color:#00007F">True</SPAN>
    Workbooks(wsTmp.Parent.Name).Close <SPAN style="color:#00007F">False</SPAN>
    Kill TmpPath
    <SPAN style="color:#00007F">Set</SPAN> OLApp = <SPAN style="color:#00007F">Nothing</SPAN>
    <SPAN style="color:#00007F">Set</SPAN> OLMsg = <SPAN style="color:#00007F">Nothing</SPAN>
    <SPAN style="color:#00007F">Set</SPAN> ws = <SPAN style="color:#00007F">Nothing</SPAN>
    <SPAN style="color:#00007F">Set</SPAN> wsTmp = <SPAN style="color:#00007F">Nothing</SPAN>
    
<SPAN style="color:#00007F">End</SPAN> Sub</FONT>
 
Upvote 0

Forum statistics

Threads
1,222,398
Messages
6,165,767
Members
451,986
Latest member
samwize

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