VB單擊命令按鈕,則文本框(text1)的英文句子按單詞分解到列表框(list1),幫幫忙把代碼補全(問號處)
題目:
VB單擊命令按鈕,則文本框(text1)的英文句子按單詞分解到列表框(list1),幫幫忙把代碼補全(問號處)
Private Sub Command1_Click()
Dim S1 As String, S2 As String
Dim I1 As Integer
' S1 = ?
I1 = 1
Do
' Do While Mid(S1, I1, 1) ? And I1
解答:
英文的句子是以空格來區分的,你只要將文本框裡的內容,用splite 拆成數組,然後加到listbox 就可以了
再問: 這是我們上機試題,就要你把?問號改成正確的代碼,然後把注釋符去掉。代碼已經寫出來了,有4個問號
再答: Private Sub Command1_Click() Dim S1 As String, S2 As String Dim I1 As Integer S1 = Me.Text1.Text I1 = 1 Do Do While Mid(S1, I1, 1) " " And I1
添加新評論