请问一个遍历的问题
<P>Sub vb()<BR>Dim filename As String<BR>Dim i As Integer<BR>Dim array1 As Variant<BR> filename = Dir("F:\*.*")<BR> i = 0<BR> Do While filename = ""</P><P> array1(i) = filename<BR> i = i + 1<BR> Loop<BR> MsgBox filename<BR>End Sub<BR>这段为什么不能得到所有F盘下的文件名啊?<BR>求教? </P> <P>Sub tt()<BR>Dim filename As String<BR>Dim i As Integer<BR> filename = Dir("F:\*.*")<BR> i = 0<BR> Do While filename <> ""</P>
<P> MsgBox filename<BR> filename = Dir()<BR> i = i + 1<BR> Loop<BR>End Sub</P>
<P> </P> <P>谢谢斑竹!</P>
页:
[1]