Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Impossible Question


Message #1 by tmccurdy@c... on Wed, 27 Jun 2001 18:34:08
Ok, I did get this to work finally, thanks.

I used the "IsControlArray" function from the Previous Post.  Don't know why
I didn't think of it before haha!

-----Original Message-----
From: Yehuda Rosenblum [mailto:Yehuda@I...]
Sent: Wednesday, June 27, 2001 2:57 PM
To: professional vb
Subject: [pro_vb] RE: Impossible Question


Why not do this:

On Error resume next

Control.Index

If Err then
	Err.clear
	Msgbox "Control Is not in an Array"
End if

On Error Goto ErrorHandler

-----Original Message-----
From: LaFerriere, Patrick M. [mailto:PLaFerriere@T...] 
Sent: Wednesday, June 27, 2001 2:42 PM
To: professional vb
Subject: [pro_vb] RE: Impossible Question


My apologies. I didn't read far enough down.

-----Original Message-----
From: Tim Mccurdy [mailto:tmccurdy@c...] 
Sent: Wednesday, June 27, 2001 2:23 PM
To: professional vb
Subject: [pro_vb] RE: Impossible Question

Umm, I specified that reading the Index off of a Control that IS NOT in
an Array, it gives an Error.

-----Original Message-----
From: LaFerriere, Patrick M. [mailto:PLaFerriere@T...]
Sent: Wednesday, June 27, 2001 2:14 PM
To: professional vb
Subject: [pro_vb] RE: Impossible Question


Could you check for an index? If it had one then yes...if not then 
no....just thinking aloud...

-----Original Message-----
From: tmccurdy@c... [mailto:tmccurdy@c...] 
Sent: Wednesday, June 27, 2001 2:34 PM
To: professional vb
Subject: [pro_vb] Impossible Question

Ok, does anyone know how to tell if a Control on a Form is part of a 
Control Array?

For example:

Dim Ctrl As Object

For Each Ctrl In Form.Controls

Next

The "IsArry" function does not work.  You get an Error if you try to 
access the "Index" property of a Control that IS NOT in an Array (and 
thanks to the beautiful Error Handler, once 1 error occurs, it never
goes 
to my ErrHandler again).

If you have any insight, please help!


  Return to Index