BeforeClose order of events?

O

owp^3

Ok, I understand that I can skip the "Do you want to save..." warning by
setting ThisWorkbook.Saved = True.

And I understand I can abort the Close by setting Cancel = True.

I need a better understanding of the order in which things occur because...

I Show a "Goodbye" Userform with a timer from the BeforeClose Event but it
gets covered up by the "Do you want to save..." warning. I would like it to
show only after the user has responded to the warning or if there is no
warning.

I could make it bigger so the user can read it behind the warning but I
really would like there to be only one userform/dialog at a time.

Any ideas?

Thanks,
owp^3
 
O

owp^3

Well, I came up with a workaround...

msgBox fires before the "Do you want to save..." warning.

So I created a msgBox with a vbYesNo button parameter. In it I give my
message and then ask the user if they want to save. If they do I force a
save. If they don't I suppress the warning message. Upside is I only get
one dialog instead of two. Downside is I can't control the appearance of the
text (i.e. fonts and alignment).

Anyway, I'd still like other options just to know but it's not so critical
now that I have a solution.

Thanks,
owp^3
 

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