Reputation: 43
i have th below code to send an email from excell which has the selected range of the active sheet in the body of mail
Sub Ticke_status_mail()
' Select the range of cells on the active worksheet.
ActiveSheet.Range("A12:J74").Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Item.To = "[email protected]"
.Item.subject = "Ticket status on " & ActiveSheet.Range("today").Value
.Item.Send
End With
End Sub
but is is also sending the hidden rows in the selected rang which should not come in the mail, could some one help in selectimg only visible cells in that range....
Upvotes: 0
Views: 5665
Reputation: 89
try with ActiveSheet.Range("A12:J74").SpecialCells(xlCellTypeVisible).select
Upvotes: 1