Macro error help

slick6

New Member
Joined
Jan 26, 2018
Messages
1
Hello everyone. First off I'm a novice at using Macros and hope this not a stupid question. I'm using a Macro that I found to email data from a spreadsheet. It works fine from my computer. I gave a copy of it to some of my co-workers to use also. When they run it they get an error. The error is 'Run-Time error 1004'. Here is the code:

Sub DaysReport()
'
' DaysReport Macro
'
' Select the range of cells on the active worksheet.
ActiveSheet.Range("a2:h26").Select

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

' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Item.To = ActiveSheet.Range("i3")
.Item.Subject = ActiveSheet.Range("i2")
.Item.Send
End With
'
End Sub

The red highlight is where the error occurs. Another difference is that I have Office 16 and they are using 10, but I built it with 10.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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