有2个命令按钮: 读数据和统计,单击读数据,则将文件夹内容写进去(只有字母和空格)显示在TEXT1中。TEXT1选中内容后,单击统计,则自动统计选中文本中从未出现过的字母,将这些字母以大写的形式显示在TEXT2中。求问号部分怎么写?????
Option Base 1
Dim x As String, max_n As Integer
Private Sub Command1_Click()
Open App.Path & "\in4.dat" For Input As #1
s = Input(LOF(1), #1)
Close #1
Text1.Text = s
End Sub
Private Sub Command2_Click()
Dim a(26) As Integer
sl = Text1.SelLength
st = Text1.SelText
Text2.Text = ""
' If ? Then
MsgBox "请先选择文本!"
Else
' For i = 1 To ?
c = Mid(st, i, 1)
If c <> " " Then
n = Asc(UCase(c)) - Asc("A") + 1
' a(n) = ?
End If
Next
' For i = 1 To ?
If a(i) = 0 Then
Text2.Text = Text2.Text + " " + Chr(Asc("A") + i - 1)
End If
Next
End If
End Sub