Closing a VBA Form Q

I

Iroel Perez

Hello there,

I have a VBA form I want to close at some point. I want the form to close
the same way it closes when you click on the [X] in the top right corner.

I've tried using a PostMessage(hWnd, WM_CLOSE, 0, 0) but this way it closes
but never calls the OnDestroy Event, and I need that.

Any help is appreciated.

Thanks in advance,
I. Perez
 

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