You are trying to call the Close method on the Name property of the
workbook. Try getting the workbook as an object and calling its Close
method.

Signature
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
> Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
> Integer)
[quoted text clipped - 9 lines]
>
> Need help!
lars.oyangen@hamstad.no - 08 May 2008 14:54 GMT
Thanks, this works:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
Integer)
Dim XLObject As Object
Set XLObject = GetObject("H:\Outlook\Prosjekt.xls")
XLObject.Close SaveChanges:=True
End Sub