2009-07-16 11 views

Répondre

2

AFAIK, Mid est le seul moyen de le faire.

+0

Merci beaucoup Helen. –

22
strString = "test" 
For i=1 To Len(strString) 
    WScript.Echo Mid(strString,i,1) 
Next 
2
a="abcd" 

for i=1 to len(a) 

msgbox right(left(a,i),1) 

next 
2

Une autre façon de le faire, à partir de 0:

str = "hola che" 
x=Len(str)  
text = "" 
For i=0 to x-1 'x-1 is because it exceeds the actual length  
    text= text & Mid(str,i+1,1)  
Next  
msgbox text 
-1

Ce code est utile de diviser UCASE et LCASE

Dim a 
a="StAcKoVeRfLoW" 

for i=o to len(a)-1 
if mid(a,i+1,1)=ucase(mid(a,i+1,1)) then 
    b=mid(a,i+1,1) 
msgbox b 
end if 
next 
Questions connexes