Showing modal Form from Modeless form

PetLahev

New Member
Joined
Jul 30, 2009
Messages
28
Hi

does anybody know why a modal form, that is shown from modeless form, will close the modeless form (parent)?

I use a modeless form to allow user continue working on a sheet but when they click on a button on the modeless form a new modal form is displayed, then when the modal form is closed and code returns into the modeless form, the modeless form will be closed (without QueryClose or Terminate events) when the code reaches end of the calling routine.

I treat with the modal form as a class, may it be problem?
Look at the example.

I don't have any idea why it doesn't working right now ...
Thanks a lot

Excel 2007 EN, Windows XP
 

xenou

MrExcel MVP, Moderator
Joined
Mar 2, 2007
Messages
16,551
Office Version
2013
Platform
Windows
You form works as expected for me (using XL2010 on XP SP3) ... the modeless form remains open when the modal form closes.

ξ
 

PetLahev

New Member
Joined
Jul 30, 2009
Messages
28
hmmm when I was creating the example I had open my real project. Now, when I'm testing the example once again and my real project is closed it works as you wrote.
ok, so the bug is somewhere in my project, I will find it and kill it :)
Thanks for your time
 
Last edited:

Forum statistics

Threads
1,081,525
Messages
5,359,272
Members
400,523
Latest member
ExcelNewbie98

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top