| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
||||
|
||||
|
An Example of the TypeOf method
Public Sub ClearForm(frm As Form) 'Pass a form name To it
Dim sMask As String For Each Control In frm.Controls If TypeOf Control Is TextBox Or TypeOf Control Is ComboBox Then Control.Text = "" 'Clear text End If If TypeOf Control Is MaskEdBox Then With Control sMask = .Mask 'Save the existing mask .Mask = "" 'Clear mask .Text = "" 'Clear text .Mask = sMask 'Reset mask End With End If If TypeOf Control Is DTPicker Then Control.Date = Date 'Set To current date End If Next Control End Sub |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > An Example of the TypeOf method |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|