0
我的代碼如下:條件在for循環逍遙子
sub main()
'''some more code'''
For j = InStr(1, stext, " ") To Len(stext)
If IsNumeric(Mid(stext, j, 1)) Or IsAlpha(Mid(stext, j, 1)) Then
letter1 = Mid(stext, j, Len(stext))
Exit For
End If
Next j
'''some more code'''
end sub
當我通過宏行走,當它到達這條線:
If IsNumeric(Mid(stext, j, 1)) Or IsAlpha(Mid(stext, j, 1)) Then
逃離了整個子!
我在做什麼錯,我該如何解決?
其逃脫了第一循環嘗試 – 2010-06-11 18:46:01
穿上錯誤轉到前0語句循環,它會告訴你一個錯誤 – volody 2010-06-11 18:47:45
可能是ISALPHA,我不認爲這是在VBA構建功能。 – 2010-06-11 18:56:44