i want to close an excel file.
i have already this code

ActiveWorkbook.Close savechanges:=True

but when ik click te button to close the excel file.
excel gives an "error" that there are item on the clipboard.
en then i have to chose yes or no te save them.
en than the excel file closes.

but is there no way that the excel file closes automaticly whitout the "error" of excel.
that i type some code the vb chose automaticly.
the answer must always be no.

can somebody help me with this.

thanks for the replay

but that doesn't solve my problem.
the only explain how to open and close an excel file.
i need to now how i can answer "yes" or "no" automaticly when excel asks to save te clipboard.

any idea ????

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.