Paul

Many thanks for your reply.  I still do not seem to be able to get my 
head around the TRY syntax but I will give it a try anyway ! Are you 
suggesting that the CATCH clause doesn't actually have to contain 
anything ?  In this case I don't need to trap an error and in the past 
might have saved ON("ERROR"), issued an ON ERROR * and restored the ON 
ERROR.

The examples I have seen for TRY... all seem a bit contrived rather than 
demonstrating "real-life" scenarios - also I need to get my head around 
how it works with and without an (ON ERROR type) handler in place.  If 
anybody has any "reading suggestions" I will gladly do some homework

Tx again

Paul Newton

Paul McNett wrote:
> Paul Newton wrote:
>   
>> Hi
>>
>> I am probably missing something very obvious (!) but am having a problem 
>> with the following code when there are no shapes to select (it works 
>> fine if there ARE shapes to select):
>>
>>     loWindow = loVisio.ActiveWindow
>>     loWindow.SelectAll
>>     loSelection = loWindow.Selection
>>     loSelection.Delete
>>
>> It's the second line that is causing the problem.  How can I test 
>> loWindow to check if there is anything to select ?
>>     
>
> Can you ask for forgiveness instead of permission? IOW:
>
> try
>    loWindow.SelectAll
>    loSelection = loWindow.Selection
>    loSelection.Delete
> catch
>    ...
> endtry
>
>
>
>   



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to