vb高手请帮忙~~~!

来源:百度知道 编辑:UC知道 时间:2024/05/15 05:10:20
请问如何将这段代码简写?if jun(3)=jun(4)=jun(5)=...=jun(75)=&h00 then ii=1
end if 如何才能将这72个数据表达出来,一个一个写太麻烦了吧

一楼的改一下就可
flag=true

for i=3 to 74
if jun(i)<>jun(i+1) then
flag=false
exit for
end if
next

if flag then ii=1

如果jun是数组了,就方便了啊
用for循环 ,就可以解决了

for i=3 to 75
if jun(i)=jun(i+1) then
flag=true
else
flag=false
break
end if
next

if flag then ii=1

不是学搞VB的,不知道语法是不是有误