Dim test(4) As String
Dim i, j, x As Integer
Dim result As Stringtest(0) = "A"
test(1) = "B"
test(2) = "C"
test(3) = "D"
test(4) = "E"For i = 0 To 4
    For j = 0 To 4
        x = j + i
        If x > 4 Then x = x - 5
        If j = 4 Then
            result = result & test(x) & vbCrLf
        Else
            result = result & test(x)
        End If
    Next
NextMsgBox result

解决方案 »

  1.   

    '加入一个Command,三个textbox
    'text3的multiline=true
    Private Sub Command1_Click()
        Dim i As Integer
        Dim j As Integer, s As Integer
        Dim sb As String
        Dim se As String
        Dim a() As String, t As String
        sb = Text1.Text
        se = Text2.Text
        s = Asc(se) - Asc(sb) + 1
        ReDim a(1 To s)
        For i = 1 To s
            If i = 1 Then
                a(i) = sb
                Debug.Print a(i)
            Else
                a(i) = Chr(Asc(a(i - 1)) + 1)
                Debug.Print a(i)
            End If
            
        Next
        For j = 1 To s
                For i = 1 To s
                        Text3.Text = Text3.Text & a(i)
                Next
                t = a(1)
                For i = 1 To s - 1
                    a(i) = a(i + 1)
                Next
                a(s) = t
                Text3.Text = Text3.Text & vbCrLf
        Next
    End Sub
      

  2.   

    补充:text1为开始字符,text2为结束字符
      

  3.   

    大家只能帮你提供思路,又不是找菲佣,你不会把下面的换换.
    test(0) = "A"
    test(1) = "B"
    test(2) = "C"
    test(3) = "D"
    test(4) = "E"
      

  4.   

    Dim test() As String
    Dim i, j, x As Integer
    Dim result As String
    your string="A,B,C,D,E"'里面的字符可以换,随便你定义
    text()=split("your string",",")  For i = 0 To ubound(text)
        For j = 0 To ubound(text)
            x = j + i
            If x > ubound(text) Then x = x - ubound(text)-1
            If j = ubound(text) Then
                result = result & test(x) & vbCrLf
            Else
                result = result & test(x)
            End If
        Next
    NextMsgBox result
      

  5.   

    不好意思,上面的split里的"your string"的引号应该去掉!!