Word 2010 Compile error: "Sub or Function not defined"

Hello from Steved


12:27 PM  RACE 1 - 18 Jan 2014  PUKE  Fine  Good  3.0  R85  $17500  2200  Ch : 1 


Why am I getting the below error please.


Compile error: Sub or Function not defined


blnRet = CheckItemExists(arrRightText, strItem)


Sub DemoCheck()
     Dim arrRightText
     Dim strItem As String
     Dim blnRet As Boolean
    
     arrRightText = Array("ELLE", "HOKI", "PAER", "PUKE", "RAUK", "TAUR", "TEAW", "TETE", "THAM")
    
     strItem = InputBox("Please input a word: ", "DlgBox")
    
     If StrPtr(strItem) = 0 Then
         Exit Sub
     Else
         If Trim$(strItem) <> "" Then
             blnRet = CheckItemExists(arrRightText, strItem)
            
             If blnRet Then
                 Application.ScreenUpdating = False
                 DoReplacing strItem, arrRightText
                 Application.ScreenUpdating = True
             End If
         End If
     End If
 End Sub


      

Answer
Answer
Does the code for the function CheckItemExists appear anywhere in the VBA project? If not, then you'll have to write it.
_____________________________
https://jay-freedman.info

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated September 30, 2021 Views 506 Applies to: