'复制如下代码运行OK Option ExplicitPrivate Sub Command1_Click() Call DrawAlphabits(5) End SubPrivate Function DrawAlphabits(ByVal nLevel As Integer) '其中nLevel是你想显示层数 Dim i As Integer, j As Integer Dim strLine As String
Const c_ASCStart = 64 Const c_Splitter = vbTab '字符间分隔符 For i = nLevel To 1 Step -1 strLine = "" For j = 1 To i strLine = strLine & c_Splitter & Chr$(c_ASCStart + j) Next j Print strLine Next i End Function
Option ExplicitPrivate Sub Command1_Click()
Call DrawAlphabits(5)
End SubPrivate Function DrawAlphabits(ByVal nLevel As Integer)
'其中nLevel是你想显示层数
Dim i As Integer, j As Integer
Dim strLine As String
Const c_ASCStart = 64
Const c_Splitter = vbTab '字符间分隔符
For i = nLevel To 1 Step -1
strLine = ""
For j = 1 To i
strLine = strLine & c_Splitter & Chr$(c_ASCStart + j)
Next j
Print strLine
Next i
End Function