ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   automatically close form before closing (https://www.excelbanter.com/excel-discussion-misc-queries/203200-automatically-close-form-before-closing.html)

Horatio J. Bilge, Jr.

automatically close form before closing
 
I am using vba to open an xl file, make changes, and then close it. To
automatically save the changes, I used:
WB.Close savechanges:=True

The problem is that a form pops up with a Workbook_BeforeClose sub (like a
splash screen). I need to close that form before the savechanges dialog.

The form is called frmEndBox, and the button to close it is cmdSubmit. I
need something like
WB.Close [frmEndBox.cmdSubmit.Value=True] savechanges:=True

Hopefully someone can help with this.

Thanks,
~ Horatio


All times are GMT +1. The time now is 05:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com