請教先進們
在表單userform1中
sub test
For i = 2 To row1
If Sheets("學生資料").Cells(i, 4) = aam Then
With Sheets("學生資料")
ListBox1.Clear
j1 = 0
For j = 2 To row1
If .Cells(j, 4) Like aam & "*" Then
j1 = j1 + 1
ListBox1.AddItem
a = ListBox1.ListCount - 1
ListBox1.List(a, 0) = .Cells(j, 1)
ListBox1.List(a, 1) = .Cells(j, 2)
ListBox1.List(a, 2) = .Cells(j, 4)
End If
Next
End With
????可有指令 使游標或畫面停在userform1
強制有ListBox1.Click之發生才能繼續call userform2
call userform2
next
end sub