vbs怎么使用mid函数呢

vbs怎么使用mid函数呢


尚方宝剑之说
浏览 445回答 2
2回答

慕丝7291255

Option Base 1Dim s As String'读取数据in4.dat中的数据并用s代替Private Sub Command1_Click()Open&nbsp;App.Path&nbsp;& "\in4.dat" For Input As #1s = Input(LOF(1), #1)Close #1Text1.Text = sEnd SubPrivate Sub Command2_Click()Dim m As IntegerIf Len(s) = 0 ThenMsgBox "请先使用“读数据”功能!"ElseIf Text1.SelLength = 0 ThenMsgBox "请先选中文本!"Elset = ""For i = 1 To Text1.SelLengthc = Mid(Text1.SelText, i, 1)If c <> " " Thent = t + cElseIf LCase(t) = "the" Thenm = m + 1End Ift = ""End IfNext iText2.Text = Str(m)End IfEnd IfEnd Sub
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript