For c = 0 To 9 If Text21(c).Text = "*" Then n = Text1(c).Text ElseIf Text11(c) = "0" Then Exit For End If
Next c
Text81.Text = n
想要实现在text21-text30中如果出现*,则记下它的位置
在text81中显示出位置是几
Private Sub Command1_Click()
Dim i As Integer
For i = 21 To 30
If InStr(Controls("Text" & i).Text, "*") <> 0 Then Text81.Text = Text81.Text & "Text" & i & " "
Next
End Sub