LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default How to judge wheter an object is existing or not

I have a function which basically returns a found shape if succeed. But
what if nothing could be found and nothing is returned? How to judge
this in its calling code?

Function findShape(text as String)

if *** then
findShape = specifiedShape
end if
end function



sub doSth()
if findShape("special") then
msgbox "found"
end if
end sub

There always reports error on the line "if NOT findShape then", saying
that "Object does not support this property or method". Any
suggestions? Thanks,

lvcha

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Qestion to judge whether the candidate has passed or failed ...... Neelakanta New Users to Excel 5 June 15th 08 03:02 PM
Formatting worksheets, existing and new, in existing workbooks G. Dagger[_2_] Excel Discussion (Misc queries) 4 January 7th 08 06:48 PM
determine wheter string has a number in it? Ted Metro Excel Worksheet Functions 5 June 2nd 07 04:18 AM
how do I judge current document is a blank one? Ronnie Excel Programming 4 August 2nd 05 02:21 PM
Get an object representing an existing Excel instance from Outlook R Avery Excel Programming 1 August 25th 04 11:16 PM


All times are GMT +1. The time now is 12:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"