I have a problem that I have boiled down to creating a UserForm, setting it as modeless, and adding a Command Button that starts a while loop (While True - DoEvents -Wend).
If you open the form, and then open another workbook in the same instance, and then close that workbook, the form and its workbook stays open as I would expect.
If you click the button to start the while loop and then close that other workbook, it takes the form down with it (but leaves its workbook open).
Does anyone know why that is happening and how to prevent it?
If you open the form, and then open another workbook in the same instance, and then close that workbook, the form and its workbook stays open as I would expect.
If you click the button to start the while loop and then close that other workbook, it takes the form down with it (but leaves its workbook open).
Does anyone know why that is happening and how to prevent it?