引用:
Private Sub Command1_Click()Dim n(1 To 100) As Integernum = InputBox("请输入数组元素个数", "输入框")Print "原始数组为:"For i = 1 To numn(i) = i * 5 + 1Print n(i);NextPrintlp:m = InputBox("请选择要删除元素的位置", "输入框")num = num - 1For i = m To numn(i) = n(i + 1)NextPrint "删除元素后数组变为:"For i = 1 To numPrint n(i);NextPrintIf MsgBox("是否继续删除?点击“确定”继续。", 1) = vbOK Then GoTo lpEnd Sub