Private Sub Form_Click()
Dim n As Integer
Dim i As Integer
n = Val(InputBox("请输入倒三角形的行数"))
For i = n To 0 Step -1
Print spacex(i)
Next i
End Sub
Function spacex(ByVal n As Integer) As String
Dim i As Integer
Dim Temp As String
For i = 1 To n
Temp = Temp & "*"
Next i
spacex = Temp
End Function