清空窗体中各栏位资料
来源:优易学  2011-12-9 17:36:17   【优易学:中国教育考试门户网】   资料下载   IT书店
 Public Sub ClearD(frm As Form)

  Dim ctl As Control

  For Each ctlControl In frm.Controls

  If Typeof ctl is acTextBox Or Typeof ctl is acComboBox Then

  ctl = ""

  DoEvents

  End If

  Next

  End Sub

  此程序稍一修改便可达到更多的功能如锁定或解锁各栏位

  Public Sub LockControls(frm As Form, blnSta As Boolean)

  Dim ctl As Control

  For Each ctl In frm.Controls

  If TypeOf ctl Is acTextBox Or TypeOf ctl Is acComboBox Then

  ctl.Enabled = blnSta

  DoEvents

  End If

  Next

  End Sub

责任编辑:小草

文章搜索:
 相关文章
热点资讯
资讯快报
热门课程培训