View Full Version : Emailing disjoint cells

11-12-2007, 12:20 PM

I've created an email button on an Excel 2003 spreadsheet to email a few
cells when pressed, using the following code I got from the KB:

'Select the range of cells on the active worksheet
ActiveSheet.Range("NeededHAGO", "NeededNAPTHA").Select

'Show the envelope on the ActiveWorkbook
ActiveWorkbook.EnvelopeVisible = True

'Set the optional introduction field that adds
'some header text to the email body. It also sets
'the To and Subject lines. Finally the message is sent.
With ActiveSheet.MailEnvelope
.Introduction = "GVEA Fuel Needs:"
.Item.To = "LJRoberts(at)gvea.com"
.Item.Subject = "GVEA Fuel Needs"
End With

It works great, except that those ranges are disjoint and there are a few
cells in between them that are also being sent. I've tried to use
Application.Union in various ways, but when those ways did work, they ended
up sending the whole sheet. Any ideas?

11-13-2007, 01:06 AM
Copy the cells that you want to a different sheet and mail that sheet.