注册 登录
编程论坛 VB6论坛

循环语句怎么只msgbox第一个结果,帮忙看下代码

lliiss681 发布于 2021-09-06 09:25, 1259 次点击
我现在用textbox在一个excel中用循环语句查找到了多个结果并进行显示了,怎么将textbox里查找的第一个数据进行msgbox输出呢?
以下是我的代码,if后面是我用的条件,可以不用研究
For j = 1 To RCOUNT Step 1
If Cells(j, 2) >= Lane And Cells(j, 2) <= Lane + 8 And Cells(j, 4) >= P And Cells(j, 5) >= HPHR Then
aaA = aaA + "   " + xlSheet.Cells(j, 1).Value & vbCrLf
End If
Me.Text1.Text = aaA
2 回复
#2
lliiss6812021-09-09 09:18
啊!各位大神是不是最近都在加班
#3
lliiss6812021-09-10 10:25
最后实现了,谢谢各位大神
实现链接见下
https://zhidao.baidu.com/question/65131615.html?qbl=relate_question_1&word=VB6%D4%F5%C3%B4%B6%C1%C8%A1textbox%CF%D4%CA%BE%B5%C4%B5%DA%D2%BB%D0%D0%C4%DA%C8%DD
1