学習帳

VBAで参照設定を変更せずに正規表現を扱う

最終更新:


VBScript.RegExpのオブジェクトを作成することで可能。

Dim re
Set re = CreateObject("VBScript.RegExp")
With re
    .Pattern = "検索"
    .IgnoreCase = True
    .Global = True
End With
testdata.Value = re.Replace(testdata.Value, "置換")


関連記事


スポンサーリンク