Replace("対象文字列","置換前の文字(列)","置換後の文字(列)",検索開始位置(省略可),置換回数(省略可),比較モード(省略可)) strSamp = "123456789" strSamp = Replace(strSamp, "123", "000") '000456789を返す strSamp = "111122223333111122223333" strSamp = Replace(strSamp, "1111", "0000", 5) '22223333000022223333を返す strSamp = "111122223333111122223333" strSamp = Replace(strSamp, "1111", "0000", 1, 1) '000022223333111122223333を返す strSamp = "111122223333111