將字符串按等寬的比列換行輸出
'*******************************************
'函數:CutString(s,10)
'功能:將字符串按等寬的比列換行輸出
'調用:CutString("123456789",3)
'參數:Str:待截取的字符串,BrN:換行的字符個數
'**********************************************
Public Function CutString(str As String, BrN As Integer) As String
Dim n As Integer
Dim s1 As String
n = Len(str)
s1 = ""
s2 = ""
For i = 1 To n
If i Mod BrN = 0 Then
s1 = Left(str, BrN)
str = Replace(str, s1, "")
s2 = s2 & Space(2) & s1 & Chr(10)
End If
Next
CutString = s2
End Function