Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
This Function will work on any form in your VB Pro...
Author:
Edgar Mamugay
E-mail:
Click to e-mail author
Submitted:
9/26/2002
Version:
VB5
Compatibility:
VB5, VB6
Category:
Controls
Views:
14007
This Function will work on any form in your VB Project just copy the code to your module. ***Clear Textbox, Listview, Combobox***** 'ClearTxtBox Me 'ClearCboBox Me 'ClearLstView Me
Declarations:
'sample how to use 'ClearTxtBox Me 'ClearCboBox Me 'ClearLstView Me Option Explicit Dim Clear As Control
Code:
Public Function ClearTxtBox(Form As Form) For Each Clear In Form.Controls If TypeOf Clear Is TextBox Then Clear.Text = "" Next Clear End Function Public Function ClearCboBox(Form As Form) For Each Clear In Form.Controls If TypeOf Clear Is ComboBox Then If Clear.Style = 2 Then MsgBox "Please set the Style of your ComboBox to (1- Simple Combo or 0- Dropdown Combo)" Else Clear.Text = "" End If End If Next Clear End Function Public Function ClearLstView(Form As Form) For Each Clear In Form.Controls If TypeOf Clear Is ListView Then Clear.ListItems.Clear Next Clear End Function
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement