Sub or function not defined ошибка

I try typing "=CountColor(A1, A2)" but I always get the error "Sub or function not defined" Why is this? I’ve been stuck on this for hours.

1 Answer 1

I could not reproduce the error that you are experiencing.

If you use the code as you have it, the result will not be accurate, for example: =CountColor(A1,B1:B20) will only give you a result of 1 or 0 because you are not adding the results together.

Для вызова необходимо определить Sub или Function . A Sub or Function must be defined in order to be called. Возможные причины этой ошибки: Possible causes of this error include:

Ошибка написания имени процедуры. Misspelling the procedure name.

Попытка вызвать процедуру из другого проекта без явного добавления ссылки на этот проект в диалоговом окне " ссылки ". Trying to call a procedure from another project without explicitly adding a reference to that project in the References dialog box.

Указание процедуры, которая не является видимой для вызывающей процедуры. Specifying a procedure that is not visible to the calling procedure.

Объявление подпрограммы библиотеки динамической компоновки Windows (DLL) или служебной программы-ресурса для Macintosh, которая не находится в указанной библиотеке или ресурсе кода. Declaring a Windows dynamic-link library (DLL) routine or Macintosh code-resource routine that is not in the specified library or code resource.

Исправление ошибки To correct this error

Убедитесь, что имя процедуры написано правильно. Make sure that the procedure name is spelled correctly.

Найдите имя проекта, содержащего процедуру, которую необходимо вызвать, в диалоговом окне ссылки . Find the name of the project containing the procedure you want to call in the References dialog box. Если она не отображается, нажмите кнопку Обзор , чтобы найти ее. If it does not appear, click the Browse button to search for it. Установите флажок слева от имени проекта и нажмите кнопку ОК. Select the check box to the left of the project name, and then click OK.

Читайте также:  Asus vivobook pro 15 n580vd цена

Проверьте имя подпрограммы. Check the name of the routine.

Rate this post

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *