Runtime error 400

kelly mort

Well-known Member
Joined
Apr 10, 2017
Messages
1,648
Office Version
2016
Platform
Windows
I just woke up to face this problem .

I have been doing my best to fix it since but I am not able to.

When I call my userform I get run time error 400

Form already displayed; can't show modally.




I have tried restarting several times but the form seems to load twice each time.

Now I am getting stacked. Can someone point out my error ?

Regards
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,513
Office Version
365
Platform
Windows
Can someone point out my error ?
Probably not without seeing all of your VBA code.
Be sure to check ALL VBA modules. Perhaps you have some code running automatically in the ThisWorkbook or one of the Sheet modules.

Have you tried stepping through your VBA code to see what it is doing, and if it is trying to open the same form twice?
 
Last edited:

kelly mort

Well-known Member
Joined
Apr 10, 2017
Messages
1,648
Office Version
2016
Platform
Windows
Probably not without seeing all of your VBA code.
Be sure to check ALL VBA modules. Perhaps you have some code running automatically in the ThisWorkbook or one of the Sheet modules.

Have you tried stepping through your VBA code to see what it is doing, and if it is trying to open the same form twice?
I am still inspecting the codes but what I don't get clear is that even when I run it from the vb editor still it shows that error.


I will step through as you said and see.


Edit ::


When you say automatically do you mean those that call the form or any code at all?
 
Last edited:

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,513
Office Version
365
Platform
Windows
I am referring to Event Procedure code, which runs automatically upon some event happening (as opposed to being called deliberately, either by manually, from a button, from a keyboard shortcut, etc).
See: http://www.cpearson.com/excel/Events.aspx
 

kelly mort

Well-known Member
Joined
Apr 10, 2017
Messages
1,648
Office Version
2016
Platform
Windows
I am referring to Event Procedure code, which runs automatically upon some event happening (as opposed to being called deliberately, either by manually, from a button, from a keyboard shortcut, etc).
See: http://www.cpearson.com/excel/Events.aspx

This link was very useful.

I just found out there are series of conflicts in my scripts so I am fixing them and the issue too seems to be varnishing gradually.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,513
Office Version
365
Platform
Windows
Excellent! Glad to hear it.
:)
 

Forum statistics

Threads
1,082,585
Messages
5,366,466
Members
400,892
Latest member
lamarh755

Some videos you may like

This Week's Hot Topics

Top