急!!!怎么把vb中的数字转换成字母,代码怎么写

[复制链接]
查看11 | 回复2 | 2017-12-15 08:48:16 | 显示全部楼层 |阅读模式
If Val(Text1.Text) > 26 Then Exit SubIf Len(Text1.Text) = 1 Then
Text2.Text = Chr(Val(Asc(Text1.Text) + 48))
'当是单位数时,直接转换ElseIf Len(Text1.Text) = 2 Then
If Val(Text1.Text) < 20 Then
Text2.Text = Chr(Val(Asc(Text1.Text)) + Val(Text1.Text) - 1 + 48)
'当是双位数时,利用差值转换
ElseIf Val(Text1.Text
回复

使用道具 举报

千问 | 2017-12-15 08:48:16 | 显示全部楼层
Chr(65) 可以得到对应的字母A
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行