I've created a VBA project using Excel 2007 and 2010. I have a userform that is now automatically closing in Excel 2013 with a CloseMode=5. On MSDN I find 3 possible modes for CloseMode, and if I look at VB6 I find a description for a fourth, but I have yet to find any description of a CloseMode 5. Any ideas what 5 is? I have tried Cancel=yes but on the next UserForm.Show, I receive Run-time error '364': Object was unloaded. I can allow it to automatically close and it opens fine with the next UserForm.show, however I want to retain the user data that is entered onto the form. There are many ways to work around and save the data elsewhere, but this does not happen when using previous versions of Excel and I'm curious what closemode 5 is. One final piece of information; the UserForm's auto closing seems to be linked to the closing of an xlsx file that was opened before the userform was called. If I prevent the closing of the file, the userform remains open; however, later manually closing the file causes the userform to also close.
Bookmarks