VB中出现必选参数是什么意思
题目如下:这是我编写的代码,但出现错误提示为:必选参数。不知道错在哪里了求指教。DimaAsStringPrivateSubCommand1_Click()Fori=0T...
题目如下:
这是我编写的代码,但出现错误提示为:必选参数。不知道错在哪里了求指教。
Dim a As StringPrivate Sub Command1_Click()For i = 0 To 9 List2.AddItem List1.List(i)Next
For i = 0 To 8 For j = 9 To i + 1 Step -1 a = Val(Right(List2.List(j - 1), 2)) b = Val(Right(List2.List(j)), 2) If a < b Then t = List2.List(j) List2.List(j) = List2.List(j - 1) List2.List(j - 1) = t End If NextNextEnd Sub
Private Sub Command2_Click()Open App.Path & "\student_sort.txt" For Output As #1For i = 0 To 9Print #1, List2.List(i)Next iClose #1End Sub
Private Sub Form_Load()Open App.Path & "\student.txt" For Input As #1 Do While Not EOF(1) Line Input #1, a b = Left(a, 2) c = Right(a, 2) h = b & " " & c List1.AddItem h LoopClose #1End Sub 展开
这是我编写的代码,但出现错误提示为:必选参数。不知道错在哪里了求指教。
Dim a As StringPrivate Sub Command1_Click()For i = 0 To 9 List2.AddItem List1.List(i)Next
For i = 0 To 8 For j = 9 To i + 1 Step -1 a = Val(Right(List2.List(j - 1), 2)) b = Val(Right(List2.List(j)), 2) If a < b Then t = List2.List(j) List2.List(j) = List2.List(j - 1) List2.List(j - 1) = t End If NextNextEnd Sub
Private Sub Command2_Click()Open App.Path & "\student_sort.txt" For Output As #1For i = 0 To 9Print #1, List2.List(i)Next iClose #1End Sub
Private Sub Form_Load()Open App.Path & "\student.txt" For Input As #1 Do While Not EOF(1) Line Input #1, a b = Left(a, 2) c = Right(a, 2) h = b & " " & c List1.AddItem h LoopClose #1End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询