L
Lance Roberts
Howdy,
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"
.Item.Send
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?
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"
.Item.Send
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?