Dim strr, ok As String Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Input #1, strr For i = 1 To 5 ok = ok & Mid(strr, i, 1) For ii = 1 To 7 ok = ok & Mid(strr, i + ii * 5, 1) Next Next ok = Replace(ok, "*", " ") Print #2, ok Close #2 Close #1 End End Sub
Dim str(8, 5) As String Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Input #1, n n = Replace(n, "*", " ") For i = 1 To 8 For j = 1 To 5 str(i, j) = Mid(n, 5 * (i - 1) + j, 1) Next Next For i = 1 To 5 For j = 1 To 8 Print #2, str(j, i); Next Next Close #2 Close #1 End End Sub
Dim strr, ok As String
回覆刪除Private Sub Form_Load()
Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Input #1, strr
For i = 1 To 5
ok = ok & Mid(strr, i, 1)
For ii = 1 To 7
ok = ok & Mid(strr, i + ii * 5, 1)
Next
Next
ok = Replace(ok, "*", " ")
Print #2, ok
Close #2
Close #1
End
End Sub
Dim str(8, 5) As String
回覆刪除Private Sub Form_Load()
Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Input #1, n
n = Replace(n, "*", " ")
For i = 1 To 8
For j = 1 To 5
str(i, j) = Mid(n, 5 * (i - 1) + j, 1)
Next
Next
For i = 1 To 5
For j = 1 To 8
Print #2, str(j, i);
Next
Next
Close #2
Close #1
End
End Sub