关于form!

fan8 2000-07-24 08:00:00
怎样表示一个form里的所有text控件,我想通过一个循环语句判断form里的所有text有没有有空值.
应该怎样表示.
...全文
100 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
chenwenlong 2000-07-25
  • 打赏
  • 举报
回复
1 最好使用TEXT数组,在这中情况下预后好办。
for i=0 to x
if text(i)= "" then

end if
next

Mike_sun 2000-07-25
  • 打赏
  • 举报
回复
使用text(i)数组,判断时:
dim i as integer
for i=0 to x
if text(i)= "" then
print i
next
x为text(i) 数组的个数
coolyangbo 2000-07-24
  • 打赏
  • 举报
回复
dim Con as control
for each Con in form1.controls
if typeof(Con) is textbox then
if trim(con.text)="" then
msgbox "...."
end if
end if
next

yiwei 2000-07-24
  • 打赏
  • 举报
回复
Dim t As Control
For Each t In Form1.Controls
If t.Tag = "Text" Then Debug.Print "这是一个TEXTBOX。"
Next
flywhc 2000-07-24
  • 打赏
  • 举报
回复

for each va in Form1.Controls

next

741

社区成员

发帖
与我相关
我的任务
社区描述
VB 版八卦、闲侃,联络感情地盘,禁广告帖、作业帖
社区管理员
  • 非技术类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧