WorkbookBeforeClose recursive call

K

karnek

Hello,

In my add-in I want to make same actions and depends on these actions
want to save or not the actual workbook. My problem is when I don't wan
to save the document I call "wb.close savechanges:=false", but afte
this method call WorkbookBeforeClose recursive.
I already implemented this in MS Word and it works, but in excel I hav
this problem.

Can you somebody help me, please.
Thanks in advance.

Karol Nekanovi
 
R

Robert Bruce

Roedd said:
Hello,

In my add-in I want to make same actions and depends on these actions
I want to save or not the actual workbook. My problem is when I don't
want to save the document I call "wb.close savechanges:=false", but
after this method call WorkbookBeforeClose recursive.
I already implemented this in MS Word and it works, but in excel I
have this problem.

Application.enableevents = false

<your code to save workbook>

Application.enableevents = true


HTH

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top