Bosch_Guido
Gebruiker
- Lid geworden
- 30 dec 2004
- Berichten
- 107
Dit ging tot voor kort goed, maar nu krijg ik een foutmelding:
kan het projkect of de bibliotheek niet vinden... en dan gaat ie bij Format staan...
Sub Mail_werkblad()
If MsgBox("U verzend hiermee dit bestand per email. Wilt u doorgaan?", vbYesNo + vbQuestion) = vbNo _
Then Exit Sub
Dim wb1 As Workbook
Dim wb2 As Workbook
Dim wbname As String
Application.ScreenUpdating = False
Set wb1 = ActiveWorkbook
wbname = "C:/" & wb1.Name & " " & _
Format(Now, "dd-mm-yy h-mm-ss") & ".xls" wb1.SaveCopyAs wbname
Set wb2 = Workbooks.Open(wbname)
With wb2
.SendMail "onderzoek@bosbadputten.nl", _
"Ingevuld onderzoek excel"
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True
MsgBox "Email verzonden, bedankt!"
End Sub
Hoe kan dat?
kan het projkect of de bibliotheek niet vinden... en dan gaat ie bij Format staan...
Sub Mail_werkblad()
If MsgBox("U verzend hiermee dit bestand per email. Wilt u doorgaan?", vbYesNo + vbQuestion) = vbNo _
Then Exit Sub
Dim wb1 As Workbook
Dim wb2 As Workbook
Dim wbname As String
Application.ScreenUpdating = False
Set wb1 = ActiveWorkbook
wbname = "C:/" & wb1.Name & " " & _
Format(Now, "dd-mm-yy h-mm-ss") & ".xls" wb1.SaveCopyAs wbname
Set wb2 = Workbooks.Open(wbname)
With wb2
.SendMail "onderzoek@bosbadputten.nl", _
"Ingevuld onderzoek excel"
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True
MsgBox "Email verzonden, bedankt!"
End Sub
Hoe kan dat?