ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Forms-Can i set the modal property? (https://www.excelbanter.com/excel-programming/336640-excel-forms-can-i-set-modal-property.html)

dpt[_6_]

Excel Forms-Can i set the modal property?
 

hi all,

I have 2 forms, form1 and form2, form1 has a button to go to form 2 and
vice versa.

The problem I am facing is , only once i can shuffle between these two
forms, the second if i want to see form 1 from form 2 or vice versa i
am getting this following error:
runtime error '400'
form already displayed:cant show modally.

Can anyone please tell me how to handle this error?

Thanks in advance.


--
dpt
------------------------------------------------------------------------
dpt's Profile: http://www.excelforum.com/member.php...o&userid=25861
View this thread: http://www.excelforum.com/showthread...hreadid=393763


mangesh_yadav[_375_]

Excel Forms-Can i set the modal property?
 

Check out the showmodal property of the form.

As for your error, you are probably trying to Load the form, can you
post your code which is giving the error. You could instead use hide
and unhide instead of unload and load, after checking the status of the
form.

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=393763


Patrick Molloy[_2_]

Excel Forms-Can i set the modal property?
 

userform1.Show vbModeless

make sure that you open the first form this way, and that the buttons also
set the show method as modeless


"dpt" wrote:


hi all,

I have 2 forms, form1 and form2, form1 has a button to go to form 2 and
vice versa.

The problem I am facing is , only once i can shuffle between these two
forms, the second if i want to see form 1 from form 2 or vice versa i
am getting this following error:
runtime error '400'
form already displayed:cant show modally.

Can anyone please tell me how to handle this error?

Thanks in advance.


--
dpt
------------------------------------------------------------------------
dpt's Profile: http://www.excelforum.com/member.php...o&userid=25861
View this thread: http://www.excelforum.com/showthread...hreadid=393763



dpt[_7_]

Excel Forms-Can i set the modal property?
 

I thank both of u for the help.both ways it works

--
dp
-----------------------------------------------------------------------
dpt's Profile: http://www.excelforum.com/member.php...fo&userid=2586
View this thread: http://www.excelforum.com/showthread.php?threadid=39376



All times are GMT +1. The time now is 09:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com