I'm building a automatic e-mail from VBA that takes a specific range. but now the macro is taking the specific range of an active sheet. I dont know how to specify my workbook and sheet properly.. maybe someone can help?
Sub Send()
Dim r As Range
Set r = Range("rm")
With r
ActiveWorkbook.EnvelopeVisible = True
With .Parent.MailEnvelope.Item
.To = ""
.CC = ""
.BCC = ""
.Subject = "Automatic Message: E-comm numbers Today"
.Send
End With
End With
End Sub
it should be in this workbook/sheet
Workbooks("Copy of Copy of shipments 5.1.xlsm").Sheets("rapportages")
hope you can help :)!