DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: please help, clearing forms

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    please help, clearing forms

    [Originally posted by james]

    i want a really simple command that will simply clear a forms contents (textboxes and drop down boxes so all boxes are blank)

    thanks

    j

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:please help, clearing forms

    [Originally posted by Jim]

    Dim o As Object

    For Each o In Form1.Controls
    If TypeName(o) = "TextBox" Then
    o.Text = ""
    ElseIf TypeName(o) = "ListBox" Then
    o.Clear
    End If
    Next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center