Private Sub Command1_Click()Dim i As Integer, result As String "定義整型變數i,字串變數resultFor i = 1 To Text1.Text Step 1 "迴圈過程開始將i的最小值和最大值限定為1和Text1的內容,步距為1 result = result & InputBox("") "彈出InputBox並且與之前的合併賦給resultNext "迴圈過程完畢Clipboard.Clear "清空剪貼簿Clipboard.SetText result "將剪貼簿內容設定為resultEnd Sub
Private Sub Command1_Click()Dim i As Integer, result As String "定義整型變數i,字串變數resultFor i = 1 To Text1.Text Step 1 "迴圈過程開始將i的最小值和最大值限定為1和Text1的內容,步距為1 result = result & InputBox("") "彈出InputBox並且與之前的合併賦給resultNext "迴圈過程完畢Clipboard.Clear "清空剪貼簿Clipboard.SetText result "將剪貼簿內容設定為resultEnd Sub
執行程式後在文字框裡面輸入要彈出的InputBox個數即可