====问题很简单,我急用======

sswang111 2001-11-01 09:25:40
Private Sub Text1_LostFocus()
Select Case InStrRev(Text1, ".", 1) '从右向左找小数点。
Case 1
Text1 = Text1 + "00"
Case 2
Text1 = Text1 + "0"

End Select
End Sub
'为何0加不上去。
...全文
69 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
powpow 2001-11-01
  • 打赏
  • 举报
回复
同意: darkmoon(翔) 
ByTheWay 2001-11-01
  • 打赏
  • 举报
回复
怎么MICROSOFT的InStrRev和InStr一样呢?
ByTheWay 2001-11-01
  • 打赏
  • 举报
回复
这样就可以了:
Private Sub Text1_LostFocus()
Text1=StrReverse(Text1)
Select Case InStrRev(Text1, ".", 1) '从右向左找小数点。
Case 1
Text1 = StrReverse(Text1) + "00"
Case 2
Text1 = StrReverse(Text1) + "0"

End Select
End Sub
darkmoon 2001-11-01
  • 打赏
  • 举报
回复
Text1.text=Text1.text & "0"
为什么不用format(Text1.text,"####.00")

7,762

社区成员

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

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