VB大神求帮忙,急急急急急急!!!!!!

2025-03-25 12:01:52
推荐回答(2个)
回答1:

for i = 1 to len(s)
a=asc(mid(s,i,1))
if a>=65 and a<=90 then

j=j+1
end if
next
fun=j

回答2:

Dim i As Integer
fun = 0
For i = 1 To Len(Text1.Text)
If Asc(Mid(Text1.Text, i, 1)) >= 65 And Asc(Mid(Text1.Text, i, 1)) <= 90 Then
fun = fun + 1
End If
Next