'文字列置き換え Dim str As String = "123456789" dim ans as string '12 → 012 に置き換える ans = str.Replace("12", "012") Debug.Print(ans) 'ans = "0123456789"