This function will test for a string that is the name of a control on a form:
Private Function findControl(ByVal strName As String) As Boolean Dim bolReturn As Boolean = False For x As Integer = 0 To Me.Controls.Count - 1 If Me.Controls.Item(x).Name.Equals(strName) Then bolReturn = True Exit For End If Next x Return bolReturn End Function On 10/10/05, alternate_dph <[EMAIL PROTECTED]> wrote: > > How do I, in vb.net <http://vb.net>, test to see if there is a control on > a form that > uses a certain name? > > > > > > > > > > '// ======================================================= > Rules : http://ReliableAnswers.com/List/Rules.asp > Home : http://groups.yahoo.com/group/vbHelp/ > ======================================================= > Post : [email protected] > Join : [EMAIL PROTECTED] > Leave : [EMAIL PROTECTED] > '// ======================================================= > > Yahoo! Groups Links > > > > > > > > > -- Don Roberts - [EMAIL PROTECTED] http://www.drscripting.com http://www.robertsgenealogy.com [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/k7folB/TM --------------------------------------------------------------------~-> '// ======================================================= Rules : http://ReliableAnswers.com/List/Rules.asp Home : http://groups.yahoo.com/group/vbHelp/ ======================================================= Post : [email protected] Join : [EMAIL PROTECTED] Leave : [EMAIL PROTECTED] '// ======================================================= Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/vbhelp/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
