Thread: IsString
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default IsString

istext is a worksheet function

go into a cell and type

=istext(A1)

Perhaps you are looking at intellisense or the object browser to say you
don't have it rather than just trying it. It is certainly available.

In the object browser you would see it under the Worksheetfunction object.

so you can do (? is for use in the immediate window)

? application.WorksheetFunction.IsText(r)

or

? WorksheetFunction.IsText(r)

or

? Application.IsText(r)

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
Thank you all for replying. You all mention 'Application.IsText' . When
I try this out my version of Excel/BA 2003 does not seem to have this
function.

Do I have to add some specific DLL to load the IsText functionality?

I am very grateful for people helping me out as I have limited access
to written information.

My situation is that I have just got a record set via a SQL query. I
need to test if the 3rd element in the record set is a string so that I
may process it correctly or tell the user of the macro that the
database might be corrupt.

Ian

Bernie Deitrick wrote:
Ian,

Perhaps?

If Application.IsText(yourValue) Then
MsgBox "That was a string"
Else
MsgBox "That wasn't a string"
End If

HTH,
Bernie
MS Excel MVP


"Ian Parker" wrote in message
.com...
I have used the VBA function IsString in the past and I do not remember

any problems. I have
upgraded to Office 2003 and suddenly I can not test if a member of a

record set is a string. Please
tell me if there is a new or another old way that still works.

There seems to be a IsNum but no IsString.