打印本文 打印本文  关闭窗口 关闭窗口  
清空窗体中各栏位资料
作者:佚名  文章来源:不详  点击数  更新时间:2008/7/28 12:15:49  文章录入:杜斌  责任编辑:杜斌

  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

  相关链接:

  2008年下半年全国计算机等级考试报名信息汇总

  更多信息请访问:计算机等级考试站 计算机等级考试在线题库 计算机等级考试论坛

打印本文 打印本文  关闭窗口 关闭窗口