汉字转拼音缩写的VBA宏

时间:2012-01-05 02:52:37
【文件属性】:
文件名称:汉字转拼音缩写的VBA宏
文件大小:3KB
文件格式:TXT
更新时间:2012-01-05 02:52:37
VBA Dim i As Integer Dim j As Integer Dim sum As Integer Dim beginrow As Integer Dim str As String Dim GetPy As String sum = ActiveWindow.RangeSelection.Rows.Count For Each rng In ActiveWindow.RangeSelection.Areas For Each cel In rng str = cel.Value GetPy = "" For i = 0 To Len(str) - 1 GetPy = GetPy & GetPYChar(Mid(str, i + 1, 1)) Next ' Application.Cells(Application.ActiveCell.Row, Application.ActiveCell.Column + 1).value = GetPy Application.Cells(cel.Row, cel.Column + 1).Value = GetPy Next Next End Sub

网友评论

  • 要是能全拼就好了
  • 不好用,字太少了.