CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 1999
    Posts
    9

    Accessing all text box on a form

    I want to access all text box on a form in a For Each loop. basically i want to clear all text boxs on a button click . this is need to do in a loop.



  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: Accessing all text box on a form

    Use TypeOf operator. This should work:

    dim a as control
    for each a in me
    if Typeof a is Textbox then
    a.text = vbNullString
    end if
    next a




    After you type "Typeof a is.." if intellisence is ON then it will prompt with the allowed Types.



    RK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured