View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Frank Stone Frank Stone is offline
external usenet poster
 
Posts: 134
Default error: "sub or function not defined" what is it trying to tell me?!

hi,
try declaring e7 as a string also or
change both D7 and E7 to Range("D7") and Range("E7").
changing the reference and you wont have to declare either
one.
since you seem to be talking about cell addresses, i
assume you are not in a loop.

-----Original Message-----
I have written the following code:

Private Sub Workbook_before close (Cancel as Boolean)

Dim D7 As String

If IsText(D7) Then
If IsEmpty(E7) Then
MsgBox "E7 is empty, please fill it"
End If

Cancel = True


End Sub

If cell D7 has text I want E7 to have text too, and if it

doesn't I
want the message box to pop up. I know the code that i

have written is
correct, but

The problem is that it is telling me that the ISTEXT sub

or function is
not defined. I am missing something but I can't figure

out what it is?


WHAT THE HECK IS IT TRYING TO TELL ME????!!!
I am SOOO confused and frustrated!


---
Message posted from http://www.ExcelForum.com/

.