當前位置:成語大全網 - 新華字典 - 用 excel vba實現 替換 重復字符。請在已有語句中修改。十分感謝。

用 excel vba實現 替換 重復字符。請在已有語句中修改。十分感謝。

Sub?LJLKJLKJ()

ss?=?InputBox("Please,?enter?a?text")

Set?reg?=?CreateObject("VBSCRIPT.REGEXP")

Set?d?=?CreateObject("scripting.dictionary")

reg.Pattern?=?"[A-Za-z]+"

reg.Global?=?True

Set?mc?=?reg.Execute(ss)

For?i?=?0?To?mc.Count?-?1

d(mc.Item(i).Value)?=?""

Next

Sheets("Output1").[A1].Resize(d.Count,?1)?=?Application.Transpose(d.keys)

Set?d?=?Nothing

End?Sub

為什麽不簡單點呢?