Close a specific dialog box

Solved
ch'duj Posted messages 31 Status Membre -  
ch'duj Posted messages 31 Status Membre -
Hello,

I'm working on Excel 7 with VBA and I have a problem with dialog boxes. I open a first dialog box and then a second one (without closing the first), and in this case, I can't close the second dialog box. Does anyone have an answer to my problem to close the second box and return to the first one?

Thank you for any responses provided.

Configuration: Windows XP / Internet Explorer 7.0

2 réponses

baloo
 
Hello,

It all depends on how you display your dialog boxes.
For example:

Sub test1()
UserForm1.Show
UserForm2.Show
End Sub

If you run test1, UserForm1 appears and waits to be closed before displaying UserForm2.

Another example:

Sub test2()
UserForm1.Show 0
UserForm2.Show 0
End Sub

If you run test2, UserForm1 and UserForm2 appear at the same time. You can close them in any order you want.

I hope I have provided some answers.
2
ch'duj Posted messages 31 Status Membre 2
 
Thank you because indeed the solution is to use UserForm1.Show 0
UserForm2.Show 0
ETC....

thank you
0