PrivateSubCommand1_Click()
s=LCase(Text1.Text)
Dimre
Setre=CreateObject(VBScript.RegExp)
re.IgnoreCase=True
re.Global=True
re.Pattern=(?:^|[\.\?\!])\s*?([a-z])
ForEachiInre.Execute(s)
n=i.FirstIndex+InStr(i.Value,i.SubMatches(0))
Mid(s,n,1)=UCase(Mid(s,n,1))
Next
Text1.Text=s
EndSub