当前位置: > 输入一些英文语句,使每个单词的第一个字母变成大写...
题目
输入一些英文语句,使每个单词的第一个字母变成大写
VB写

提问时间:2020-07-27

答案
标点符号你还 可以添加
Private Sub Command1_Click()
Dim a,a1,s1,s2,b()
f = Array(",",",".",":",";","!")
a = Text1
For j = 0 To UBound(f)
a1 = Split(a,f(j))
ReDim b(UBound(a1))
For i = 0 To UBound(a1)
s1 = Left(a1(i),1)
s1 = UCase(s1)
s2 = Right(a1(i),Len(a1(i)) - 1)
b(i) = s1 & s2
Next i
For i = 0 To UBound(a1)
txt = txt & b(i) & f(j)
Next i
a = Left(txt,Len(txt) - 1)
txt = ""
Next j
Text1 = a
End Sub
Private Sub Form_Load()
Text1 = "sad,aaa?bd!fds;sdf:sdf"
End Sub
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.