Open "a:\VBA.txt" For Input As #1
Do While Not EOF(1)
Input #1, a1,a2,a3,a4,a5,a6,a7,a8,a9,a10
Loop
Close
Selection.TypeText Text:=a1
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText Text:=a2
Selection.MoveRight Unit:=wdCharacter, Count:=1
.
.
.
Selection.TypeText Text:=a10
上面是我縮短的程式,我的問題在如何用for迴圈把a1,a2,a3....a10的值給秀出來
我的想法如下但不行:
for i=1 to 10
Selection.TypeText Text:=a + i
Selection.MoveRight Unit:=wdCharacter, Count:=1
next
Do While Not EOF(1)
Input #1, a1,a2,a3,a4,a5,a6,a7,a8,a9,a10
Loop
Close
Selection.TypeText Text:=a1
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText Text:=a2
Selection.MoveRight Unit:=wdCharacter, Count:=1
.
.
.
Selection.TypeText Text:=a10
上面是我縮短的程式,我的問題在如何用for迴圈把a1,a2,a3....a10的值給秀出來
我的想法如下但不行:
for i=1 to 10
Selection.TypeText Text:=a + i
Selection.MoveRight Unit:=wdCharacter, Count:=1
next
全站熱搜
留言列表