-
How to tell if control is loaded
Hi
I am loading command buttons at run- time in a control array. Is there
anyway to see if a particular element is already loaded? somthing like:
If IsLoaded(Mycmd(3)) then "Don't try to load it again"
Can anyone suggest a way to test or do I have to wait for the error to be
generated and go from there.
Thanks
Tim Cowan
-
Re: How to tell if control is loaded
Well, the easy way may be to trap the error, but you could do something like
this:
Dim ctl As Control
Dim bFound As Boolean
For Each ctl In MyCmd
If ctl.Index = 3 Then
bFound = True
Exit For
End If
Next ctl
If bFound Then
MsgBox "Found it"
Else
MsgBox "Not found"
End If
Hope that helps,
Larry
Tim Cowan wrote in message <38f4b95c@news.devx.com>...
>I am loading command buttons at run- time in a control array. Is there
>anyway to see if a particular element is already loaded? somthing like:
>
>If IsLoaded(Mycmd(3)) then "Don't try to load it again"
>
>Can anyone suggest a way to test or do I have to wait for the error to be
>generated and go from there.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|