Error 1004 in Excel VBA when creating e-mail

hennie68

New Member
Joined
Mar 31, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Please help with this new error that all of a sudden occurs in a spreadsheet that I have been using for 5 years now.
The spreadsheet works well on 3 other PCs.
All of the PCs are running on the latest update of win10 x64.

1585655817613.png


The relevant part of the VBA code reads:

Sub Klaar()

‘ Klaar Macro
‘Druk Data per e-pos aan Yenzani
‘Create a new Workbook Containing 1 Sheet (left most)and sends as attachment.

ThisWorkbook.Sheets(“Druk Data”).Copy

With ActiveWorkbook
ActiveSheet.Shapes.Range(Array(“Right Arrow 1″)).Select
Selection.Delete
.SendMail Recipients:=”hennie@landuse.co.za”, Subject:=”Montego Bay Electricity ” & Format(Date, “yyyy/mm/dd”)

.Close SaveChanges:=False

End With

‘ Gaan na voorblad en Stoor lêer

Range(“A1”).Select
Sheets(“Kieslys”).Select
ActiveWorkbook.Save
End Sub
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,214,527
Messages
6,120,054
Members
448,940
Latest member
mdusw

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