hazesoft
Gebruiker
- Lid geworden
- 11 nov 2004
- Berichten
- 361
Omdat meerdere collega's op diverse scholen met de werkmap werken, is op ieder blad een knop aanwezig om het geopende blad via mail te versturen.
Ik krijg echter een foutmelding volgens de bijlage, terwijl de sheet wel verstuurd wordt.
Wat is er fout in onderstaande code?
Sub Mail_ActiveSheet()
Dim wb As Workbook
Dim strdate As String
strdate = Format(Now, "dd-mm-yy")
Application.ScreenUpdating = False
ActiveSheet.Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Sheet van " & ThisWorkbook.Name _
& " " & strdate & ".xls"
.SendMail "hazesoft@home.nl", _
"Werkblad software-index"
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True
End Sub
Ik krijg echter een foutmelding volgens de bijlage, terwijl de sheet wel verstuurd wordt.
Wat is er fout in onderstaande code?
Sub Mail_ActiveSheet()
Dim wb As Workbook
Dim strdate As String
strdate = Format(Now, "dd-mm-yy")
Application.ScreenUpdating = False
ActiveSheet.Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Sheet van " & ThisWorkbook.Name _
& " " & strdate & ".xls"
.SendMail "hazesoft@home.nl", _
"Werkblad software-index"
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True
End Sub
Bijlagen
Laatst bewerkt: