I have two forms. I move from Form1 to Form2 where there is a ok button in form2. Now i have to set form2 in such a way that other forms cannot be accessed unless the ok button of form2 is pressed......How to handle this?
Printable View
I have two forms. I move from Form1 to Form2 where there is a ok button in form2. Now i have to set form2 in such a way that other forms cannot be accessed unless the ok button of form2 is pressed......How to handle this?
Code:With Form2
.Hide
.Show vbModal
End With
If you show Form2 vbModal, then no other form in your project can be interacted with, until you unload Form2
Code:Form2.Show vbModal
'When Form2 is unloaded, code execution will return to here
Set Form2 = Nothing