Private Sub Command1_Click()Dim n, i, S As Longn = InputBox("请输入自然数n的值", "期末考试第一题")For i = 1 To n Step 2S = i + iNextLabel1.Caption = "1到" & n & "之间奇数的和为:" & SEnd SubPrivate Sub Command2_Click()Unload MeEnd Sub窗体中有Command1、Command2和Label1