【发布时间】:2012-01-27 19:50:45
【问题描述】:
我正在为 Access 2010 练习 VBA。
我阅读了有关我的帖子的所有建议帖子,但没有找到任何具体内容。 我知道如何移动字符串中的特定字符,我不知道如何删除等于某物的特定字符。
如果有电话号码,我想从电话号码中移动字符 1 或 1-。
例如:17188888888 转 7188888888 或 1-7188888888 转 7188888888
我正在尝试使用 if 语句,首先删除 1。
电话号码输入为字符串而不是数字。
这是我开始的:我收到一条错误消息,指出 RemoveFirstChar 不明确。
Public Function RemoveFirstChar(RemFstChar As String) As String
If Left(RemFstChar, 1) = "1" Then
RemFstChar = Replace(RemFstChar, "1", "")
End If
RemoveFirstChar = RemFstChar
End Function
【问题讨论】: