在richtextbox中怎么实现查找下一个?

asdzzf 2009-03-23 09:29:46
Dim s1, s2 As String
Dim e As Integer
s1 = Form1.RichTextBox1.Text
s2 = InputBox("输入要查找的数字")
e = InStr(s1, s2)
Form1.RichTextBox1.SelStart = e - 1
Form1.RichTextBox1.SelLength = Len(s2)
这是源代码有错的地方也帮忙看下
怎么实现查找下一个
...全文
112 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
penguinhzf 2009-03-24
  • 打赏
  • 举报
回复
Dim s1, s2 As String
Dim e As Integer
s1 = Form1.RichTextBox1.Text
s2 = InputBox("输入要查找的数字")
e = InStr(1,s1, s2,3)
Form1.RichTextBox1.SelStart = e - 1
Form1.RichTextBox1.SelLength = Len(s2)

我初步帮你改了一下,你可以先试试

7,785

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧