vb提取LIST中的数字

2025-03-22 00:33:23
推荐回答(2个)
回答1:

Private Sub Command1_Click()
Dim i As Integer, N As Integer, NM As Integer
For i = 0 To List1.ListCount - 1
N = StrReverse(Val(StrReverse(List1.List(i))))
Debug.Print N
NM = NM + N
Next
MsgBox NM
End Sub
Private Sub Form_Load()
List1.AddItem "ABC123"
List1.AddItem "BCD456"
List1.AddItem "谢谢567"
End Sub

回答2:

比较ASCii码

不知道你具体是什么意思,也没给你源码