2009-08-06
展开全部
Dim s As String
Dim s1 As String
Dim s2 As String
Open "c:\1.txt" For Outut As #1
s1 = "1233 322222"
s2 = "45 3310"
s = s1
s = Space$(20 - Lenb(s)) & s
Printf #1, s
s = s2
s = Space$(20 - Lenb(s)) & s
Printf #1, s
Close #1
Dim s1 As String
Dim s2 As String
Open "c:\1.txt" For Outut As #1
s1 = "1233 322222"
s2 = "45 3310"
s = s1
s = Space$(20 - Lenb(s)) & s
Printf #1, s
s = s2
s = Space$(20 - Lenb(s)) & s
Printf #1, s
Close #1
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Text1.Alignment = 1
0左 1右 2中
0左 1右 2中
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_Click()
Dim hFile As Long
Dim pFile As String
Dim a, tmp
Dim s As String
Dim i As Long, j As Long
a = Array("1233 322222", "45 3310")
pFile = "d:\test.txt"
hFile = FreeFile
Open pFile For Output As hFile
For i = 0 To UBound(a)
tmp = Split(a(i), Space(1))
For j = 0 To UBound(tmp)
s = Space(8) '这个你根据需要定义长度
RSet s = tmp(j) '用RSet语句实现右对齐
tmp(j) = s
Next
Print #hFile, Join(tmp)
Next
Close
End Sub
Dim hFile As Long
Dim pFile As String
Dim a, tmp
Dim s As String
Dim i As Long, j As Long
a = Array("1233 322222", "45 3310")
pFile = "d:\test.txt"
hFile = FreeFile
Open pFile For Output As hFile
For i = 0 To UBound(a)
tmp = Split(a(i), Space(1))
For j = 0 To UBound(tmp)
s = Space(8) '这个你根据需要定义长度
RSet s = tmp(j) '用RSet语句实现右对齐
tmp(j) = s
Next
Print #hFile, Join(tmp)
Next
Close
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询