thank,版主作者: tmtony 时间: 2008-1-5 20:55
谢谢无私分享作者: Victor_Duane 时间: 2008-1-5 23:56
根据你的这个示例,我做了如下修改
模块函数
Public Function gethz(ByVal strScc As String, Optional intchoose As Integer = 1) As String
Dim m As Integer
Dim n As Integer
n = Len(strScc)
For m = 1 To n
If Mid(strScc, m, 1) Like "[A-Za-z]" Then
Exit For
End If
n = n - 1
Next
Select Case intchoose
Case 1
gethz = Trim(Left(strScc, Len(strScc) - n))
Case 2
gethz = Trim(Right(strScc, n))
End Select
End Function
查询语句如下
SELECT Sheet1.原文, gethz([原文],1) AS 汉字, gethz([原文],2) AS 英文
FROM Sheet1;作者: huangqinyong 时间: 2008-1-6 10:46
5楼版主提供的模块受益匪浅,thank.现将代修改后的实例再次传上,供大家参考