This article features error number Code 401, commonly known as Can’t show non-modal form when modal form is displayed described as When a modal form is displayed, you cant display another non-modal form.
About Runtime Code 401
Runtime Code 401 happens when Windows fails or crashes whilst it’s running, hence its name. It doesn’t necessarily mean that the code was corrupt in some way, but just that it did not work during its run-time. This kind of error will appear as an annoying notification on your screen unless handled and corrected. Here are symptoms, causes and ways to troubleshoot the problem.
Definitions (Beta)
Here we list some definitions for the words contained in your error, in an attempt to help you understand your problem. This is a work in progress, so sometimes we might define the word incorrectly, so feel free to skip this section!
- Display — Display refers to a style property in CSS
- Modal — Refers to a graphical dialog used to display important information to the user
- Form — A form is essentially a container that can be used to hold any amount of any subset of several types of data
Symptoms of Code 401 — Can’t show non-modal form when modal form is displayed
Runtime errors happen without warning. The error message can come up the screen anytime Windows is run. In fact, the error message or some other dialogue box can come up again and again if not addressed early on.
There may be instances of files deletion or new files appearing. Though this symptom is largely due to virus infection, it can be attributed as a symptom for runtime error, as virus infection is one of the causes for runtime error. User may also experience a sudden drop in internet connection speed, yet again, this is not always the case.
(For illustrative purposes only)
Causes of Can’t show non-modal form when modal form is displayed — Code 401
During software design, programmers code anticipating the occurrence of errors. However, there are no perfect designs, as errors can be expected even with the best program design. Glitches can happen during runtime if a certain error is not experienced and addressed during design and testing.
Runtime errors are generally caused by incompatible programs running at the same time. It may also occur because of memory problem, a bad graphics driver or virus infection. Whatever the case may be, the problem must be resolved immediately to avoid further problems. Here are ways to remedy the error.
Repair Methods
Runtime errors may be annoying and persistent, but it is not totally hopeless, repairs are available. Here are ways to do it.
If a repair method works for you, please click the upvote button to the left of the answer, this will let other users know which repair method is currently working the best.
Please note: Neither ErrorVault.com nor it’s writers claim responsibility for the results of the actions taken from employing any of the repair methods listed on this page — you complete these steps at your own risk.
Method 1 — Close Conflicting Programs
When you get a runtime error, keep in mind that it is happening due to programs that are conflicting with each other. The first thing you can do to resolve the problem is to stop these conflicting programs.
- Open Task Manager by clicking Ctrl-Alt-Del at the same time. This will let you see the list of programs currently running.
- Go to the Processes tab and stop the programs one by one by highlighting each program and clicking the End Process buttom.
- You will need to observe if the error message will reoccur each time you stop a process.
- Once you get to identify which program is causing the error, you may go ahead with the next troubleshooting step, reinstalling the application.
Method 2 — Update / Reinstall Conflicting Programs
Using Control Panel
- For Windows 7, click the Start Button, then click Control panel, then Uninstall a program
- For Windows 8, click the Start Button, then scroll down and click More Settings, then click Control panel > Uninstall a program.
- For Windows 10, just type Control Panel on the search box and click the result, then click Uninstall a program
- Once inside Programs and Features, click the problem program and click Update or Uninstall.
- If you chose to update, then you will just need to follow the prompt to complete the process, however if you chose to Uninstall, you will follow the prompt to uninstall and then re-download or use the application’s installation disk to reinstall the program.
Using Other Methods
- For Windows 7, you may find the list of all installed programs when you click Start and scroll your mouse over the list that appear on the tab. You may see on that list utility for uninstalling the program. You may go ahead and uninstall using utilities available in this tab.
- For Windows 10, you may click Start, then Settings, then choose Apps.
- Scroll down to see the list of Apps and features installed in your computer.
- Click the Program which is causing the runtime error, then you may choose to uninstall or click Advanced options to reset the application.
Method 3 — Update your Virus protection program or download and install the latest Windows Update
Virus infection causing runtime error on your computer must immediately be prevented, quarantined or deleted. Make sure you update your virus program and run a thorough scan of the computer or, run Windows update so you can get the latest virus definition and fix.
Method 4 — Re-install Runtime Libraries
You might be getting the error because of an update, like the MS Visual C++ package which might not be installed properly or completely. What you can do then is to uninstall the current package and install a fresh copy.
- Uninstall the package by going to Programs and Features, find and highlight the Microsoft Visual C++ Redistributable Package.
- Click Uninstall on top of the list, and when it is done, reboot your computer.
- Download the latest redistributable package from Microsoft then install it.
Method 5 — Run Disk Cleanup
You might also be experiencing runtime error because of a very low free space on your computer.
- You should consider backing up your files and freeing up space on your hard drive
- You can also clear your cache and reboot your computer
- You can also run Disk Cleanup, open your explorer window and right click your main directory (this is usually C: )
- Click Properties and then click Disk Cleanup
Method 6 — Reinstall Your Graphics Driver
If the error is related to a bad graphics driver, then you may do the following:
- Open your Device Manager, locate the graphics driver
- Right click the video card driver then click uninstall, then restart your computer
Method 7 — IE related Runtime Error
If the error you are getting is related to the Internet Explorer, you may do the following:
- Reset your browser.
- For Windows 7, you may click Start, go to Control Panel, then click Internet Options on the left side. Then you can click Advanced tab then click the Reset button.
- For Windows 8 and 10, you may click search and type Internet Options, then go to Advanced tab and click Reset.
- Disable script debugging and error notifications.
- On the same Internet Options window, you may go to Advanced tab and look for Disable script debugging
- Put a check mark on the radio button
- At the same time, uncheck the «Display a Notification about every Script Error» item and then click Apply and OK, then reboot your computer.
If these quick fixes do not work, you can always backup files and run repair reinstall on your computer. However, you can do that later when the solutions listed here did not do the job.
Other languages:
Wie beheben Fehler 401 (Nicht-modales Formular kann nicht angezeigt werden, wenn modales Formular angezeigt wird) — Wenn ein modales Formular angezeigt wird, können Sie kein anderes nicht-modales Formular anzeigen.
Come fissare Errore 401 (Impossibile mostrare il modulo non modale quando viene visualizzato il modulo modale) — Quando viene visualizzato un modulo modale, non è possibile visualizzare un altro modulo non modale.
Hoe maak je Fout 401 (Kan niet-modale vorm niet weergeven wanneer modale vorm wordt weergegeven) — Wanneer een modaal formulier wordt weergegeven, kunt u geen ander niet-modaal formulier weergeven.
Comment réparer Erreur 401 (Impossible d’afficher le formulaire non modal lorsque le formulaire modal est affiché) — Lorsqu’un formulaire modal est affiché, vous ne pouvez pas afficher un autre formulaire non modal.
어떻게 고치는 지 오류 401 (모달 형식이 표시될 때 비모달 형식을 표시할 수 없습니다.) — 모달 양식이 표시되면 다른 비모달 양식을 표시할 수 없습니다.
Como corrigir o Erro 401 (Não é possível mostrar o formulário não modal quando o formulário modal é exibido) — Quando um formulário modal é exibido, você não pode exibir outro formulário não modal.
Hur man åtgärdar Fel 401 (Kan inte visa icke-modal form när modal form visas) — När en modalform visas kan du inte visa en annan icke-modal form.
Как исправить Ошибка 401 (Невозможно отобразить немодальную форму, когда отображается модальная форма) — Когда отображается модальная форма, вы не можете отобразить другую немодальную форму.
Jak naprawić Błąd 401 (Nie można wyświetlić formularza niemodalnego, gdy wyświetlany jest formularz modalny) — Gdy wyświetlany jest formularz modalny, nie można wyświetlić innego formularza niemodalnego.
Cómo arreglar Error 401 (No se puede mostrar el formulario no modal cuando se muestra el formulario modal) — Cuando se muestra un formulario modal, no puede mostrar otro formulario no modal.
About The Author: Phil Hart has been a Microsoft Community Contributor since 2010. With a current point score over 100,000, they’ve contributed more than 3000 answers in the Microsoft Support forums and have created almost 200 new help articles in the Technet Wiki.
Follow Us:
Last Updated:
13/10/22 02:46 : A iPhone user voted that repair method 1 worked for them.
This repair tool can fix common computer problems such as blue screens, crashes and freezes, missing DLL files, as well as repair malware/virus damage and more by replacing damaged and missing system files.
STEP 1:
Click Here to Download and install the Windows repair tool.
STEP 2:
Click on Start Scan and let it analyze your device.
STEP 3:
Click on Repair All to fix all of the issues it detected.
DOWNLOAD NOW
Compatibility
Requirements
1 Ghz CPU, 512 MB RAM, 40 GB HDD
This download offers unlimited scans of your Windows PC for free. Full system repairs start at $19.95.
Article ID: ACX03101EN
Applies To: Windows 10, Windows 8.1, Windows 7, Windows Vista, Windows XP, Windows 2000
Speed Up Tip #22
Reduce The Fonts Loading at Startup:
Having too many fonts can slow down your computer significantly. To avoid this issue, try to trim down the fonts you use by deleting the ones that you don’t use. Don’t forget to backup those fonts in case you decide to use them again.
Click Here for another way to speed up your Windows PC
Microsoft & Windows® logos are registered trademarks of Microsoft. Disclaimer: ErrorVault.com is not affiliated with Microsoft, nor does it claim such affiliation. This page may contain definitions from https://stackoverflow.com/tags under the CC-BY-SA license. The information on this page is provided for informational purposes only. © Copyright 2018
Error Number: | Runtime Error 401 | |
Error Name: | Can’t show non-modal form when modal form is displayed | |
Error Description: | When a modal form is displayed, you cant display another non-modal form. | |
Developer: | Microsoft Corporation | |
Software: | Windows Operating System | |
Applies to: | Windows XP, Vista, 7, 8, 10, 11 |
Overview of Can’t show non-modal form when modal form is displayed
It is common for people to refer to Can’t show non-modal form when modal form is displayed as a runtime error (bug). Programmers work through different levels of debugging in attempt to make sure that Windows Operating System is as close to error-free as possible. Unfortunately, engineers are human beings and can often make blunders during testing, missing error 401.
«When a modal form is displayed, you cant display another non-modal form.» might occur to Windows Operating System users even through normal use of the application. When this happens, end-users can inform Microsoft Corporation about the presence of Can’t show non-modal form when modal form is displayed bugs. Microsoft Corporation then would need to correct these errors in the master source code and provide a modified version for downloading. Therefore, when you encounter a prompt for a Windows Operating System update, it is usually because it’s a solution for fixing error 401 and other bugs.
When Does Error 401 Happen?
It’s likely that when you’re loading Windows Operating System you will run into Can’t show non-modal form when modal form is displayed. We are going to review at the key causes of error 401 errors:
Error 401 Crash — This is a typical runtime error 401 error that crashes the machine entirely. This usually happens when Windows Operating System can’t handle the provided input, or when it doesn’t know what to output.
Can’t show non-modal form when modal form is displayed Memory Leak — Error 401 memory leak results in Windows Operating System continually using more and more memory, bogging down the system. Possible sparks include a deallocation failure that happened in a non-C++ program, when corrupted assembly code improperly executes an infinite loop.
Error 401 Logic Error — You can experience a logic error when the program produces incorrect results even if the user specifies the right value. This is due to errors in Microsoft Corporation’s source code handling input improperly.
File corruption, missing, or deleted Can’t show non-modal form when modal form is displayed files can result in Windows Operating System errors. Obtaining a new, uninfected copy of your Microsoft Corporation file will usually resolve the problem. After the problem file is replaced, running a registry scan can help clean up any invalid Can’t show non-modal form when modal form is displayed, file extension, or other file path references which could have been affected from a previous malware infection.
Can’t show non-modal form when modal form is displayed Errors
The most common Can’t show non-modal form when modal form is displayed errors that can appear on a Windows-based computer are:
- «Can’t show non-modal form when modal form is displayed Application Error.»
- «Can’t show non-modal form when modal form is displayed not a Win32 program.»
- «Can’t show non-modal form when modal form is displayed has encountered a problem and needs to close. We are sorry for the inconvenience.»
- «Sorry, we can’t find Can’t show non-modal form when modal form is displayed.»
- «Can’t show non-modal form when modal form is displayed is missing.»
- «Start-up error in application: Can’t show non-modal form when modal form is displayed.»
- «Can’t show non-modal form when modal form is displayed is not running.»
- «Can’t show non-modal form when modal form is displayed quit.»
- «Faulty Program Path: Can’t show non-modal form when modal form is displayed.»
Usually Can’t show non-modal form when modal form is displayed errors with Windows Operating System happen during startup or shutdown, while Can’t show non-modal form when modal form is displayed related programs are running, or rarely during the OS update sequence. Notating when Can’t show non-modal form when modal form is displayed errors occur is paramount in finding the cause of the Windows Operating System problems and reporting them to Microsoft Corporation for help.
Problem Sources of Can’t show non-modal form when modal form is displayed
Most Can’t show non-modal form when modal form is displayed problems stem from a missing or corrupt Can’t show non-modal form when modal form is displayed, virus infection, or invalid Windows registry entries associated with Windows Operating System.
Primarily, Can’t show non-modal form when modal form is displayed issues are produced by:
- Invalid (corrupt) Can’t show non-modal form when modal form is displayed registry entry.
- Virus or malware infection that has corrupted the Can’t show non-modal form when modal form is displayed file or related Windows Operating System program files.
- A different program (not related with Windows Operating System) deleted Can’t show non-modal form when modal form is displayed maliciously or by mistake.
- Can’t show non-modal form when modal form is displayed is in conflict with another program (shared file).
- Corrupt download or incomplete installation of Windows Operating System software.
Product by Solvusoft
Download Now
WinThruster 2022 — Scan your PC for computer errors.
Compatible with Windows 11, 10, 8, 7, Vista, XP and 2000
Optional Offer for WinThruster by Solvusoft | EULA | Privacy Policy | Terms | Uninstall
-
May 21st, 2009, 06:50 PM
#1
Thread Starter
Hyperactive Member
What causes this? I’ve looked into it, but not found very much information.
It occurs when my app starts up and displays a splashscreen while loading another form.
Thanks
-
May 21st, 2009, 07:08 PM
#2
Re: «Runtime Error ‘401’: Can’t show non-modal form when modal form is displayed.»
The cause is pretty much what the error says.
Once a modal form is shown, only way to show another form is
1. Close/Hide all modal forms and then show the non-modal form
2. Open every form thereafter as vbModalSo the splash screen is being shown modal? If so, it must show the the other form as modal also or simply don’t show the splash as modal. You will get this error also if the other form is trying to show itself while a modal form is displayed….
Example:
1. frmSplash.Show vbModal
2. frmSplash then loads other form: Load frmOther <no error yet>
3. in other form’s Load event: Me.Show <error because frmSplash is modal>
-
May 21st, 2009, 07:13 PM
#3
Member
Re: «Runtime Error ‘401’: Can’t show non-modal form when modal form is displayed.»
This normally occurs when there’s a Show instruction for the form that’s loading before the end of the Form_Load event, in other words the end of the Form_Load event is trying to show the form that’s already showing, causing the error.
Ensure that the form is not visible at the end of the Form_Load event. If the form is required to be visible during loading for debugging purposes add an Me.Hide instruction at the very end of the Form_Load event.
Homer: To start press any key. Where’s the ‘any’ key?
-
May 21st, 2009, 07:13 PM
#4
Thread Starter
Hyperactive Member
Re: «Runtime Error ‘401’: Can’t show non-modal form when modal form is displayed.»
Gotcha.
My frmSplashscreen form is the startup form. My frmMain form contains a webbrowser control. On the DocumentComplete event of my webbrowser in frmMain, it triggers this among other tasks:
Code:
frmMain.Show Unload frmSplashscreen
Flipping those two around should solve the problem, correct?
(Only some users of my product are receiving this error — I am not, so that’s why I didn’t just test to see myself)
-
May 21st, 2009, 07:14 PM
#5
Member
Re: «Runtime Error ‘401’: Can’t show non-modal form when modal form is displayed.»
Ooops, got my wires crossed ignore my advice above!!
Homer: To start press any key. Where’s the ‘any’ key?
-
May 21st, 2009, 07:16 PM
#6
Thread Starter
Hyperactive Member
Re: «Runtime Error ‘401’: Can’t show non-modal form when modal form is displayed.»
Ok, thanks guys
As an interesting side note, it seems to be users that have custom XP themes who have this issue. Not sure if they’re using something like WindowBlinds or the UXTheme patch.
Появление сообщения об ошибке 401 Unauthorized Error («отказ в доступе») при открытии страницы сайта означает неверную авторизацию или аутентификацию пользователя на стороне сервера при обращении к определенному url-адресу. Чаще всего она возникает при ошибочном вводе имени и/или пароля посетителем ресурса при входе в свой аккаунт. Другой причиной являются неправильные настройки, допущенные при администрировании web-ресурса. Данная ошибка отображается в браузере в виде отдельной страницы с соответствующим описанием. Некоторые разработчики интернет-ресурсов, в особенности крупных порталов, вводят собственную дополнительную кодировку данного сбоя:
- 401 Unauthorized;
- Authorization Required;
- HTTP Error 401 – Ошибка авторизации.
Попробуем разобраться с наиболее распространенными причинами возникновения данной ошибки кода HTTP-соединения и обсудим способы их решения.
Причины появления ошибки сервера 401 и способы ее устранения на стороне пользователя
При доступе к некоторым сайтам (или отдельным страницам этих сайтов), посетитель должен пройти определенные этапы получения прав:
- Идентификация – получение вашей учетной записи («identity») по username/login или email.
- Аутентификация («authentic») – проверка того, что вы знаете пароль от этой учетной записи.
- Авторизация – проверка вашей роли (статуса) в системе и решение о предоставлении доступа к запрошенной странице или ресурсу на определенных условиях.
Большинство пользователей сохраняют свои данные по умолчанию в истории браузеров, что позволяет быстро идентифицироваться на наиболее часто посещаемых страницах и синхронизировать настройки между устройствами. Данный способ удобен для серфинга в интернете, но может привести к проблемам с безопасностью доступа к конфиденциальной информации. При наличии большого количества авторизованных регистрационных данных к различным сайтам используйте надежный мастер-пароль, который закрывает доступ к сохраненной в браузере информации.
Наиболее распространенной причиной появления ошибки с кодом 401 для рядового пользователя является ввод неверных данных при посещении определенного ресурса. В этом и других случаях нужно попробовать сделать следующее:
- Проверьте в адресной строке правильность написания URL. Особенно это касается перехода на подстраницы сайта, требующие авторизации. Введите правильный адрес. Если переход на страницу осуществлялся после входа в аккаунт, разлогинитесь, вернитесь на главную страницу и произведите повторный вход с правильными учетными данными.
- При осуществлении входа с сохраненными данными пользователя и появлении ошибки сервера 401 проверьте их корректность в соответствующих настройках данного браузера. Возможно, авторизационные данные были вами изменены в другом браузере. Также можно очистить кэш, удалить cookies и повторить попытку входа. При удалении истории браузера или очистке кэша потребуется ручное введение логина и пароля для получения доступа. Если вы не помните пароль, пройдите процедуру восстановления, следуя инструкциям.
- Если вы считаете, что вводите правильные регистрационные данные, но не можете получить доступ к сайту, обратитесь к администратору ресурса. В этом случае лучше всего сделать скриншот проблемной страницы.
- Иногда блокировка происходит на стороне провайдера, что тоже приводит к отказу в доступе и появлению сообщения с кодировкой 401. Для проверки можно попробовать авторизоваться на том же ресурсе с альтернативного ip-адреса (например, используя VPN). При подтверждении блокировки трафика свяжитесь с провайдером и следуйте его инструкциям.
Некоторые крупные интернет-ресурсы с большим количеством подписчиков используют дополнительные настройки для обеспечения безопасности доступа. К примеру, ваш аккаунт может быть заблокирован при многократных попытках неудачной авторизации. Слишком частые попытки законнектиться могут быть восприняты как действия бота. В этом случае вы увидите соответствующее сообщение, но можете быть просто переадресованы на страницу с кодом 401. Свяжитесь с администратором сайта и решите проблему.
Иногда простая перезагрузка проблемной страницы, выход из текущей сессии или использование другого веб-браузера полностью решают проблему с 401 ошибкой авторизации.
Устранение ошибки 401 администратором веб-ресурса
Для владельцев сайтов, столкнувшихся с появлением ошибки отказа доступа 401, решить ее порою намного сложнее, чем обычному посетителю ресурса. Есть несколько рекомендаций, которые помогут в этом:
- Обращение в службу поддержки хостинга сайта. Как и в случае возникновения проблем с провайдером, лучше всего подробно описать последовательность действий, приведших к появлению ошибки 401, приложить скриншот.
- При отсутствии проблем на стороне хостинг-провайдера можно внести следующие изменения в настройки сайта с помощью строки Disallow:/адрес проблемной страницы. Запретить индексацию страницам с ошибкой в «rоbоts.txt», после чего добавить в файл «.htассеss» строку такого типа:
Redirect 301 /oldpage.html http://site.com/newpage.html.
Где в поле /oldpage.html прописывается адрес проблемной страницы, а в http://site.com/newpage.html адрес страницы авторизации.
Таким образом вы перенаправите пользователей со всех страниц, которые выдают ошибку 401, на страницу начальной авторизации.
- Если после выполнения предыдущих рекомендаций пользователи при попытках авторизации все равно видят ошибку 401, то найдите на сервере файл «php.ini» и увеличьте время жизни сессии, изменив значения следующих параметров: «session.gc_maxlifetime» и «session.cookie_lifetime» на 1440 и 0 соответственно.
- Разработчики веб-ресурсов могут использовать более сложные методы авторизации и аутентификации доступа для создания дополнительной защиты по протоколу HTTP. Если устранить сбой простыми методами администрирования не удается, следует обратиться к специалистам, создававшим сайт, для внесения соответствующих изменений в код.
Хотя ошибка 401 и является проблемой на стороне клиента, ошибка пользователя на стороне сервера может привести к ложному требованию входа в систему. К примеру, сетевой администратор разрешит аутентификацию входа в систему всем пользователям, даже если это не требуется. В таком случае сообщение о несанкционированном доступе будет отображаться для всех, кто посещает сайт. Баг устраняется внесением соответствующих изменений в настройки.
Дополнительная информация об ошибке с кодом 401
Веб-серверы под управлением Microsoft IIS могут предоставить дополнительные данные об ошибке 401 Unauthorized в виде второго ряда цифр:
- 401, 1 – войти не удалось;
- 401, 2 – ошибка входа в систему из-за конфигурации сервера;
- 401, 3 – несанкционированный доступ из-за ACL на ресурс;
- 401, 501 – доступ запрещен: слишком много запросов с одного и того же клиентского IP; ограничение динамического IP-адреса – достигнут предел одновременных запросов и т.д.
Более подробную информацию об ошибке сервера 401 при использовании обычной проверки подлинности для подключения к веб-узлу, который размещен в службе MS IIS, смотрите здесь.
Следующие сообщения также являются ошибками на стороне клиента и относятся к 401 ошибке:
- 400 Bad Request;
- 403 Forbidden;
- 404 Not Found;
- 408 Request Timeout.
Как видим, появление ошибки авторизации 401 Unauthorized не является критичным для рядового посетителя сайта и чаще всего устраняется самыми простыми способами. В более сложной ситуации оказываются администраторы и владельцы интернет-ресурсов, но и они в 100% случаев разберутся с данным багом путем изменения настроек или корректировки html-кода с привлечением разработчика сайта.
Правила форума
Темы, в которых будет сначала написано «что нужно сделать», а затем просьба «помогите», будут закрыты.
Читайте требования к создаваемым темам.
- Tamahawk
- Обычный пользователь
- Сообщения: 78
- Зарегистрирован: 03.02.2004 (Вт) 22:11
Run time error ‘401’ Заранее БЛАГОДАРЕН
Программеры нужна помошь колеге
Прога готовая(Стандартный сервер и клиент ) и все отлично когда через ВБ ран делаеш, но после создания инстоляшки уже выплывает окно, мол
Run time error ‘401’
Can’t show non-modal form when modal form is displayed
с английским у меня все лады, но…….
может кто нить уже имел такое
Заранее БЛАГОДАРЕН.
- xolod
- Гуру
- Сообщения: 1162
- Зарегистрирован: 15.01.2004 (Чт) 0:42
- Откуда: Moscow
-
- Сайт
- ICQ
xolod » 07.02.2004 (Сб) 10:47
Господа, учите испанский
А если серьезно, так у тебя же написано: «Нельзя показывать не модальную форму, если модальная уже отображена.». Суть в том, что нельзя из одной формы вызвать одну модальную, а другую нет.
Например, у тебя есть 3 формы (f1, f2, f3) и таймер (t1):
- Код: Выделить всё
Private Sub f1_Load()
call f2.Show(vbModal,Me)
End Sub
Private Sub t1_Timer()
call f3.Show
End Sub
---
Вызовет ошибку 401, т.к. уже есть модальная форма и она пытается показать не модальную.
- Tamahawk
- Обычный пользователь
- Сообщения: 78
- Зарегистрирован: 03.02.2004 (Вт) 22:11
Tamahawk » 07.02.2004 (Сб) 19:28
Да я уже знаю Иврит
и про таймер, но у меня тама нет никакой модальной формы и MDI форм, вот в чем бардак и все это тока после создания екзешки в ВБ как по маслу. Это КЛЮК в ВБ
тама тока такой кусок
do
……
doevents
Msgbox «asdasdasdasdasd»
loop
я думаю где то здесь
Хай ладно спасибо
Разберемся!
- alibek
- Большой Человек
- Сообщения: 14204
- Зарегистрирован: 19.04.2002 (Пт) 11:40
- Откуда: Russia
alibek » 09.02.2004 (Пн) 11:18
Попробуй везде, где делается Form.Show следом поставить MsgBox. После этого скомпилируй и посмотри, в каком порядке вылазят окна. Скорее всего у тебя глючит из-за того, что ты не очень правильно отображал окна.
Lasciate ogni speranza, voi ch’entrate.
- Tamahawk
- Обычный пользователь
- Сообщения: 78
- Зарегистрирован: 03.02.2004 (Вт) 22:11
Tamahawk » 09.02.2004 (Пн) 19:28
Пасибо коллеги но я уже давно решил
Благодарен еще раз ВСЕМ
Вернуться в Visual Basic 1–6
Кто сейчас на конференции
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS
Contact US
Thanks. We have received your request and will respond promptly.
Log In
Come Join Us!
Are you a
Computer / IT professional?
Join Tek-Tips Forums!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts - Keyword Search
- One-Click Access To Your
Favorite Forums - Automated Signatures
On Your Posts - Best Of All, It’s Free!
*Tek-Tips’s functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Posting Guidelines
Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Students Click Here
Run-Time Error 401 — Non Modal Form..Run-Time Error 401 — Non Modal Form..(OP) 17 Sep 02 04:17 Hi peeps, Even though I’ve already done a search on this subject and found a load of info on it, I thought I’d start a thread about it because my problem is a bit different from what I read about.. On my app’s splash screen, I have a previous instance check, which if the program is already running and someone tries to run another one, it’ll detect the second version and display a msgbox before stopping the second program in it’s tracks. When this happens the msgbox appears and the program unloads but I get a run-time error, which doesn’t look too professional.. Run-Time Error: ‘401’ How do I get around this? Should I hide the splash screen before the msgbox appears, thus causing the splash screen to lose focus — or does it get a bit more complicated than this? Can anyone help? Thanks, Renegade.. Red Flag SubmittedThank you for helping keep Tek-Tips Forums free from inappropriate posts. |
Join Tek-Tips® Today!
Join your peers on the Internet’s largest technical computer professional community.
It’s easy to join and it’s free.
Here’s Why Members Love Tek-Tips Forums:
Talk To Other Members
- Notification Of Responses To Questions
- Favorite Forums One Click Access
- Keyword Search Of All Posts, And More…
Register now while it’s still free!
Already a member? Close this window and log in.
Join Us Close
#1
K e n
-
- Authentic Member
-
- 11 posts
New Member
Posted 21 April 2014 — 03:24 AM
Can one of you kind experts please point me (VBA dilettante) in the right direction?
Situation:
I have made an Excel workbook for a user who has no idea about Excel and who should not come into contact with it. The WB has two sheets, one a list of ITEMS, and one a list of CONTAINERS.
On activating a sheet a non-modal form is called containing command buttons for sheet-appropriate subroutines such as entering new items/containers, deleting same, editing data, searching for keywords in the lists, printing hard copy, changing to other page… The command buttons each fire a dialogue box shown modally on top of the non-modal menu form. Each modal form (dialogue box) must, of course, be closed after carrying out its tasks in the appropriate list and before the user can start a new task or access the excel cells directly in any way. On deactivation of a sheet, the menu form (non-modal) is unloaded (to refresh/update its labels).
Problem:
This set-up works OK in general, but in certain sets of circumstances which I cannot fathom, when calling up the modeless menu list in the Worksheet_Activate() event on changing from one page to the other, the makro gives me a runtime error 401 message («Can’t show non-modal form when modal form displayed») and th edebug option marks the command line «frmITEMS.show vbmodeless» or «frmCONTAINERS.show vbmodeless resp.. I understand the message all right; but I cannot locate any modal form being displayed.
Questions:
What are the commands to run through the opened forms and list their names? If I knew which forms were causing the hitch, I might get closer to a solution.
What might be causing the problem and what can I do to avoid it?
Cheerio
Ken
- Back to top
Advertisements
Advertisements
Register to Remove
#2
paws
paws
-
- Administrator
-
- 6,088 posts
Tech Team
Posted 25 April 2014 — 06:14 AM
Hi Ken, I noticed that no one had yet responded to your post, so thought I’d take a look.
Are you sure this is not a business issue?
We tend to deal, here on the WTT forum with folks’ private computers used for non business purposes leaving people with business type issues to consult their usual IT adviser or buy in the expertise from a consultant who deals in these areas.
Have a look at the Terms of Use… here’s an extract:
«What the Tech is a family friendly site, accessible to anyone over 13 years of age. Please keep all content appropriate.
We offer free computer help and tech support for home and personal use. We are not here to support others that work for profit, or to support/replace your company’s IT department.»
Post back if I have misunderstood the situation.
Regards
paws
The help you receive here is free. If you wish to show your appreciation, then you may donate to help keep us online. http://www.whatthetech.com/donate
- Back to top
#3
K e n
K e n
-
- Authentic Member
-
- 11 posts
New Member
Posted 27 April 2014 — 01:05 AM
Hello, Paws.
Not business. I’m making a household inventory for my wife, who hates to have anything out of her sight; trouble is she gets easily discouraged when faced with computer programmes like Access or Excel. So I’m trying to present her with a very simple interface and with lists of household and clothing items, what containers they’re stored in and where these containers are in the attic.
As far as the problem is concerned, I seem to have found a solution by accident. At least, the error message and its cause have not appeared in several days. Before that it was driving me nuts.
Thanks for picking up the ball, here, by the way. I thought my question must have been so boring that everybody was ignoring it (maybe that’s still true!).
Regards
K e n
- Back to top
#4
paws
paws
-
- Administrator
-
- 6,088 posts
Tech Team
Posted 27 April 2014 — 01:19 AM
Hi Ken
Thanks for the extra information, and glad to hear you got it fixed.
If any other folks are suffering, trying to figure out a similar issue, it would be great if you could post back with the steps that worked for you…
The search engines will then index it and maybe other folks will bless the name of Ken if it helps them with their issues.
Regards
paws
The help you receive here is free. If you wish to show your appreciation, then you may donate to help keep us online. http://www.whatthetech.com/donate
- Back to top
#5
K e n
K e n
-
- Authentic Member
-
- 11 posts
New Member
Posted 27 April 2014 — 02:03 AM
Well, Paws, I don’t really know what I did.
Possibly, because of my working on two monitors simultaneously and in debug mode, I had been failing to see that a dialogue box (modal) was in fact open; when the code window was activated for editing, any dialogue box positioned on the same monitor got concealed behind it and I had been thinking it had been unloaded or «hidden» (in the VBA sense). This would, of course, be in line with the sense of the error message.
Regards
K e n
- Back to top
#6
paws
paws
-
- Administrator
-
- 6,088 posts
Tech Team
Posted 27 April 2014 — 03:10 AM
Ok
All understood Ken
Thanks for responding
Regards
paws
The help you receive here is free. If you wish to show your appreciation, then you may donate to help keep us online. http://www.whatthetech.com/donate
- Back to top
Related Topics