I am using the following function

Function FindText(ByVal txt As String, obj_nam As String, scroll_len As Integer) As Boolean
FindText = False
txtPattern = "*" & txt & "*"
For I = 0 To 16
GUIObject.Scroll scroll_len * I, tpScrollVertical
txt = GUIObject.CaptureText
If txt Like txtPattern Then
'MsgBox "text found!"
FindText = True
Exit For
End If
Next I

Here i am searching for a text string by scrolling the GUIobject(obj_nam).

But some times there won't be any scrollbars..
so i need to put a check for this
something like...
If GUIObject.scrollbar exists then go..

how to do this...
any guess