{"id":1393,"date":"2019-02-14T12:00:26","date_gmt":"2019-02-14T03:00:26","guid":{"rendered":"https:\/\/www.bold.ne.jp\/engineer-club\/?p=1393"},"modified":"2025-10-06T17:08:12","modified_gmt":"2025-10-06T08:08:12","slug":"vba-replace","status":"publish","type":"post","link":"https:\/\/www.bold.ne.jp\/engineer-club\/vba-replace","title":{"rendered":"VBA\u306eReplace\u95a2\u6570\u3068\u306f\uff1f\u6587\u5b57\u5217\u306e\u4e00\u90e8\u5206\u3092\u7f6e\u63db\u3059\u308b\u305f\u3081\u306eReplace\u95a2\u6570\u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"<p>VBA\u3067\u6587\u5b57\u5217\u3092\u7f6e\u63db\u3059\u308b\u3068\u304d\u306b\u306f\u3001<span>[Replace<\/span>\u95a2\u6570<span>] <\/span>\u3092\u4f7f\u3046\u3068\u7c21\u5358\u306b\u5b9f\u73fe\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001\u5f15\u6570\u306e\u4f7f\u3044\u65b9\u3068\u9055\u3044\u306b\u3064\u3044\u3066\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#VBAReplace\">\uff11\uff0e\u3010VBA\u3011Replace\u95a2\u6570\u306b\u3064\u3044\u3066<\/a><ul><li><a href=\"#-Replace\">\uff11-\uff11\uff0eReplace\u95a2\u6570\u306f\u6587\u5b57\u5217\u306e\u4e00\u90e8\u5206\u3092\u7f6e\u63db\u3059\u308b\u300c\u95a2\u6570\u300d\u3067\u3059<\/a><\/li><li><a href=\"#-Replace-2\">\uff11-\uff12\uff0eReplace\u95a2\u6570\u306e\u69cb\u6587\u306b\u3064\u3044\u3066<\/a><\/li><li><a href=\"#i\">\uff11-\uff13\uff0e\u30e2\u30b8\u30e5\u30fc\u30eb\u5ba3\u8a00\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u6bd4\u8f03\u65b9\u6cd5\u3092\u8a2d\u5b9a\u3059\u308b<\/a><\/li><\/ul><\/li><li><a href=\"#VBAReplace-2\">\uff12\uff0e\u3010VBA\u3011Replace\u95a2\u6570\u306e\u4f7f\u7528\u4f8b<\/a><ul><li><a href=\"#i-2\">\uff12-\uff11\uff0e\u52d5\u4f5c\u78ba\u8a8d\u3059\u308b\u5834\u5408\u306f\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u5229\u7528\u3059\u308b<\/a><\/li><li><a href=\"#-Replace-3\">\uff12-\uff12\uff0eReplace\u95a2\u6570\u306e\u57fa\u672c\u7684\u306a\u4f7f\u7528\u4f8b<\/a><\/li><li><a href=\"#-Replace-4\">\uff12-\uff13\uff0eReplace\u95a2\u6570\u306e\u5f15\u6570\u3092\u4f7f\u3063\u305f\u4f7f\u7528\u4f8b<\/a><\/li><li><a href=\"#-Replace-5\">\uff12-\uff14\uff0eReplace\u95a2\u6570\u306e\u623b\u308a\u5024\u3092\u78ba\u8a8d\u3059\u308b<\/a><\/li><li><a href=\"#-ReplaceVBA\">\uff12-\uff15\uff0eReplace\u95a2\u6570\u3092\u4f7f\u3063\u305fVBA\u8cc7\u683c\u8a66\u9a13\u306e\u51fa\u984c\u3092\u4e88\u60f3\u3059\u308b<\/a><\/li><\/ul><\/li><li><a href=\"#i-3\">\uff13\uff0e\u3055\u3044\u3054\u306b<\/a><\/li><\/ul><\/div>\n<h2><span id=\"VBAReplace\">\uff11\uff0e\u3010VBA\u3011Replace\u95a2\u6570\u306b\u3064\u3044\u3066<\/span><\/h2>\n<h3><span id=\"-Replace\">\uff11-\uff11\uff0eReplace\u95a2\u6570\u306f\u6587\u5b57\u5217\u306e\u4e00\u90e8\u5206\u3092\u7f6e\u63db\u3059\u308b\u300c\u95a2\u6570\u300d\u3067\u3059<\/span><\/h3>\n<p>Replace\u95a2\u6570\u3068\u306f<span>VBA<\/span>\u306b\u3042\u3089\u304b\u3058\u3081\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u300c\u95a2\u6570\u300d\u3067\u3059\u3002<span>Replace<\/span>\u95a2\u6570\u306f\u3001\u6587\u5b57\u5217\u306e\u4e00\u90e8\u5206\u3092\u7f6e\u63db\u3057\u305f\u3044\u5834\u5408\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002\u6587\u5b57\u5217\u306e\u4e2d\u306b\u3042\u308b\u691c\u7d22\u6587\u5b57\u5217\u306e\u201c\uff21\u201d\u3092\u201c\uff22\u201d\u306b\u7f6e\u304d\u63db\u3048\u3001\u305d\u306e\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u4f4f\u6240\u30c7\u30fc\u30bf\u306b\u3042\u308b\u96fb\u8a71\u756a\u53f7\u3001<span>&#8220;03(9999)9999&#8221;<\/span>\u3001<span>&#8220;03-9999-9999&#8221;<\/span>\u3001<span>&#8220;(03)9999-9999&#8221; <\/span>\u306a\u3069\u306e\u30d0\u30e9\u30d0\u30e9\u306e\u6a19\u8a18\u3092\u3059\u3079\u3066\u30cf\u30a4\u30d5\u30f3\u306b\u7d71\u4e00\u3057\u305f\u3044\u5834\u5408\u306f<span>Replace<\/span>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u4f4f\u6240\u30c7\u30fc\u30bf\u306b\u3042\u308b\u4f4f\u6240\u3001\u5408\u4f75\u306b\u3088\u308a\u300c\u6d66\u548c\u5e02\u300d\u3092\u300c\u3055\u3044\u305f\u307e\u5e02\u300d\u306b\u7f6e\u63db\u3057\u305f\u3044\u5834\u5408\u306f<span>Replace<\/span>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h3><span id=\"-Replace-2\">\uff11-\uff12\uff0eReplace\u95a2\u6570\u306e\u69cb\u6587\u306b\u3064\u3044\u3066<\/span><\/h3>\n<div class=\"attention a-3\">\n<p class=\"attention-title\">\u3010\u66f8\u5f0f\u3011<\/p>\n<p>Replace (<strong>\u6587\u5b57\u5217<\/strong> , <strong>\u691c\u7d22\u6587\u5b57\u5217<\/strong> , <strong>\u7f6e\u63db\u6587\u5b57\u5217<\/strong> <span>[, <\/span>\u958b\u59cb\u4f4d\u7f6e<span>] [, <\/span>\u7f6e\u63db\u56de\u6570<span>] [, <\/span>\u6bd4\u8f03\u65b9\u6cd5<span>])<br \/>\n\u623b\u308a\u5024\u306f\u6587\u5b57\u5217(string)\u5f62\u5f0f<\/span><\/p>\n<\/div>\n<p>\u5f15\u6570\u306b\u3064\u3044\u3066\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<table border=\"1\" style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 25.7815%; height: 24px; text-align: center; border-color: #000000; background-color: #38d983;\">\u5f15\u6570<\/td>\n<td style=\"width: 60.9826%; height: 24px; text-align: center; border-color: #000000; background-color: #38d983;\">\u8aac\u660e<\/td>\n<td style=\"width: 13.2358%; height: 24px; text-align: center; border-color: #000000; background-color: #38d983;\"><strong>\u7701\u7565\u5024<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 25.7815%; height: 24px; border-color: #000000;\"><strong>\u6587\u5b57\u5217\u3000\u3000<\/strong>\uff08\u5fc5\u9808\uff09<\/td>\n<td style=\"width: 60.9826%; height: 24px; border-color: #000000;\">\u3082\u3068\u3068\u306a\u308b\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3059\u308b<\/td>\n<td style=\"width: 13.2358%; height: 24px; text-align: center; border-color: #000000;\"><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 25.7815%; height: 24px; border-color: #000000;\"><strong>\u691c\u7d22\u6587\u5b57\u5217<\/strong>\uff08\u5fc5\u9808\uff09<\/td>\n<td style=\"width: 60.9826%; height: 24px; border-color: #000000;\">\u691c\u7d22\u3059\u308b\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3059\u308b<\/td>\n<td style=\"width: 13.2358%; height: 24px; text-align: center; border-color: #000000;\"><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 25.7815%; height: 24px; border-color: #000000;\"><strong>\u7f6e\u63db\u6587\u5b57\u5217<\/strong>\uff08\u5fc5\u9808\uff09<\/td>\n<td style=\"width: 60.9826%; height: 24px; border-color: #000000;\">\u7f6e\u63db\u3059\u308b\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3059\u308b<\/td>\n<td style=\"width: 13.2358%; height: 24px; text-align: center; border-color: #000000;\"><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 25.7815%; height: 24px; border-color: #000000;\">\u958b\u59cb\u4f4d\u7f6e\uff08\u7701\u7565\u53ef\u80fd\uff09<\/td>\n<td style=\"width: 60.9826%; height: 24px; border-color: #000000;\">\u958b\u59cb\u3059\u308b\u4f4d\u7f6e\uff08\u7701\u7565\u3059\u308b\u3068<span>1<\/span>\u3068\u306a\u308b\uff09<\/td>\n<td style=\"width: 13.2358%; height: 24px; text-align: center; border-color: #000000;\">1<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 25.7815%; height: 24px; border-color: #000000;\">\u7f6e\u63db\u56de\u6570\uff08\u7701\u7565\u53ef\u80fd\uff09<\/td>\n<td style=\"width: 60.9826%; height: 24px; border-color: #000000;\">\u7f6e\u63db\u3059\u308b\u56de\u6570\uff08\u7701\u7565\u3059\u308b\u3068\u3059\u3079\u3066\u3092\u7f6e\u63db\u3059\u308b\uff09<\/td>\n<td style=\"width: 13.2358%; height: 24px; text-align: center; border-color: #000000;\">-1<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 25.7815%; height: 24px; border-color: #000000;\">\u6bd4\u8f03\u65b9\u6cd5\uff08\u7701\u7565\u53ef\u80fd\uff09<\/td>\n<td style=\"width: 60.9826%; height: 24px; border-color: #000000;\">\u6bd4\u8f03\u65b9\u6cd5\u3092\u793a\u3059\u6570\u5024\u3002\u5024\u306b\u3064\u3044\u3066\u306f\u3001\u300c\u6bd4\u8f03\u65b9\u6cd5 \u5b9a\u6570\u300d\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/td>\n<td style=\"width: 13.2358%; height: 24px; text-align: center; border-color: #000000;\">0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6bd4\u8f03\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<table border=\"1\" style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 27.4868%; text-align: center; background-color: #38d983; border-color: #000000;\"><strong>\u6bd4\u8f03\u65b9\u6cd5 \u5b9a\u6570<\/strong><\/td>\n<td style=\"width: 62.3223%; text-align: center; background-color: #38d983; border-color: #000000;\"><strong>\u8aac\u660e<\/strong><\/td>\n<td style=\"width: 10.1908%; text-align: center; background-color: #38d983; border-color: #000000;\">\u5024<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.4868%; border-color: #000000;\">vbUseCompareOption<\/td>\n<td style=\"width: 62.3223%; border-color: #000000;\">Option Compare \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u8a2d\u5b9a\u3092\u4f7f\u7528\u3057\u3066\u6bd4\u8f03\u3059\u308b<\/td>\n<td style=\"width: 10.1908%; text-align: center; border-color: #000000;\">-1<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.4868%; border-color: #000000;\">vbBinaryCompare<\/td>\n<td style=\"width: 62.3223%; border-color: #000000;\">\u30d0\u30a4\u30ca\u30ea\u30e2\u30fc\u30c9\u3067\u6bd4\u8f03\u3059\u308b\u3002<br \/>\n\u534a\u89d2\u3068\u5168\u89d2\u3001\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u3001\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e<span>UPPER<\/span>\u3068<span>lower<\/span>\u3092<strong>\u533a\u5225\u3057\u307e\u3059<\/strong>\u3002<\/td>\n<td style=\"width: 10.1908%; text-align: center; border-color: #000000;\">0<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.4868%; border-color: #000000;\">vbTextCompare<\/td>\n<td style=\"width: 62.3223%; border-color: #000000;\">\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u3067\u6bd4\u8f03\u3059\u308b\u3002<br \/>\n\u534a\u89d2\u3068\u5168\u89d2\u3001\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u3001\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e<span>UPPER<\/span>\u3068<span>lower<\/span>\u3092<strong>\u533a\u5225\u3057\u306a\u3044<\/strong>\u3002<\/td>\n<td style=\"width: 10.1908%; text-align: center; border-color: #000000;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.4868%; border-color: #000000;\">vbDatabaseCompare<br \/>\n(Access\u306e\u307f<span>)<\/span><\/td>\n<td style=\"width: 62.3223%; border-color: #000000;\">DB\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u8a2d\u5b9a\u3067\u6bd4\u8f03\u3059\u308b<\/td>\n<td style=\"width: 10.1908%; text-align: center; border-color: #000000;\">2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u300c<span>vbUseCompareOption<\/span>\u300d\u306f\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u5ba3\u8a00\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u6307\u5b9a\u3057\u305f\u5024\u3067\u6bd4\u8f03\u3057\u307e\u3059\u3002<\/p>\n<h3><span id=\"i\">\uff11-\uff13\uff0e\u30e2\u30b8\u30e5\u30fc\u30eb\u5ba3\u8a00\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u6bd4\u8f03\u65b9\u6cd5\u3092\u8a2d\u5b9a\u3059\u308b<\/span><\/h3>\n<p>Option Compare \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u6bd4\u8f03\u65b9\u6cd5\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u6bd4\u8f03\u65b9\u6cd5\u306f<span>Excel<\/span>\u306f\u300c<span>Option Compare Binary<\/span>\u300d\u3001\u300c<span>Option Compare Text<\/span>\u300d\u306e\uff12\u3064\u3002<span>Access<\/span>\u306f\u300c<span>Option Compare Database<\/span>\u300d\u3092\u30d7\u30e9\u30b9\u3057\u3066\uff13\u3064\u3067\u3059\u3002\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5148\u982d\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5ba3\u8a00\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u3044\u305a\u308c\u304b\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<p>\u30e2\u30b8\u30e5\u30fc\u30eb\u4f5c\u6210\u306e\u969b\u306e\u521d\u671f\u5024\u306f<span> Excel<\/span>\u3068<span>Access<\/span>\u3067\u306f\u7570\u306a\u308a\u307e\u3059\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p><strong><span class=\"f-marker-p\">\u3010ExcelVBA\u306e\u5834\u5408\u3011<\/span><\/strong><\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/02\/975c47cc6126adb11b8ba9338430fbeb.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/02\/975c47cc6126adb11b8ba9338430fbeb.jpg\" alt=\"excel\u306e\u5834\u5408\" width=\"593\" height=\"312\" class=\"alignnone size-full wp-image-1394\" \/><\/a><\/p>\n<p><strong><span class=\"f-marker-y\">\u3010AccessVBA\u306e\u5834\u5408\u3011<\/span><\/strong><\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/02\/bb01f93b33b3bdb5ecf1cfea392994bf.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/02\/bb01f93b33b3bdb5ecf1cfea392994bf.jpg\" alt=\"Access\u306e\u5834\u5408\" width=\"605\" height=\"328\" class=\"alignnone size-full wp-image-1395\" \/><\/a><\/p>\n<h2><span id=\"VBAReplace-2\">\uff12\uff0e\u3010VBA\u3011Replace\u95a2\u6570\u306e\u4f7f\u7528\u4f8b<\/span><\/h2>\n<h3><span id=\"i-2\">\uff12-\uff11\uff0e\u52d5\u4f5c\u78ba\u8a8d\u3059\u308b\u5834\u5408\u306f\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u5229\u7528\u3059\u308b<\/span><\/h3>\n<p>\u30b3\u30fc\u30c9\u5b9f\u884c\u4e2d\u306e\u5909\u6570\u306e\u5024\u3092<span>Debug<\/span>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e<span>Print<\/span>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u51fa\u529b\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5229\u7528\u3059\u308b\u306b\u306f\u5b9f\u884c\u3059\u308b\u524d\u306b\u3042\u3089\u304b\u3058\u3081\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u958b\u3044\u3066\u304a\u304d\u307e\u3059\u3002\uff08<span>[<\/span>\u8868\u793a<span>]<\/span>\u30e1\u30cb\u30e5\u30fc\u2192<span>[<\/span>\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6<span>]<\/span>\u3092\u9078\u629e\u3057\u307e\u3059\uff09\u30b3\u30fc\u30c9\u30a6\u30a3\u30f3\u30c9\u30a6\u5185\u306b\u300c<span>Sample2_1<\/span>\u300d\u306e\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u3066\u30b3\u30fc\u30c9\u5185\u3067\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u3078\u6b21\u306e\u3088\u3046\u306b\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Option Explicit\r\n\r\nSub Sample2_1()\r\n    Debug.Print \"Hello, World!\"\r\nEnd Sub<\/pre>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/02\/039c205ba55356ac8af5bf9c964c51f0.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/02\/039c205ba55356ac8af5bf9c964c51f0.jpg\" alt=\"\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\" width=\"482\" height=\"137\" class=\"alignnone size-full wp-image-1396\" \/><\/a><\/p>\n<p>\u52d5\u4f5c\u78ba\u8a8d\u3059\u308b\u5834\u5408\u306f\u3001<span>Debug.Print<\/span>\u3092\u4f7f\u3044\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<h3><span id=\"-Replace-3\">\uff12-\uff12\uff0eReplace\u95a2\u6570\u306e\u57fa\u672c\u7684\u306a\u4f7f\u7528\u4f8b<\/span><\/h3>\n<h4>\uff12-\uff12-\uff11\uff0e\u7f6e\u63db\u3059\u308b\u6642\u306b\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306eUPPER\u3068lower\u3092\u533a\u5225\u3059\u308b<\/h4>\n<p>\u25a0<span class=\"f-marker-w\">\u30d0\u30a4\u30ca\u30ea\u30e2\u30fc\u30c9<\/span>\uff08\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e<span>UPPER<\/span>\u3068<span>lower<\/span>\u3092<strong>\u533a\u5225\u3059\u308b<\/strong>\uff09<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Option Explicit\r\nOption Compare Binary\r\n\r\nSub Sample2_2_1()\r\n    Dim strVal As String\r\n    Dim strRet As String\r\n\r\n    strVal = \"accessVBA\"\r\n    strRet = Replace(strVal, \"a\", \"*\")\r\n    Debug.Print strRet                  '*ccessVBA\r\n    \r\n    strRet = Replace(strVal, \"A\", \"*\")\r\n    Debug.Print strRet                  'accessVB*\r\nEnd Sub<\/pre>\n<p>9\u884c\u76ee\u89e3\u8aac\u3001\u6587\u5b57\u5217<span>&#8220;accessVBA&#8221; <\/span>\u306b\u3042\u308b <span>&#8220;a&#8221; <\/span>\u3092<span> &#8220;*&#8221; <\/span>\u306b\u7f6e\u63db\u3057\u307e\u3059\u3002<span>1<\/span>\u6587\u5b57\u76ee\u304b\u3089\u3059\u3079\u3066\u7f6e\u63db\u3057\u307e\u3059\u3002\u6bd4\u8f03\u65b9\u6cd5\u304c\u7701\u7565\u306e\u305f\u3081 <span>Option Compare <\/span>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u300c<span>Option Compare Binary<\/span>\u300d\u3068\u306a\u308a\u3001\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e<span>UPPER<\/span>\u3068<span>lower<\/span>\u3092<strong>\u533a\u5225\u3059\u308b<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u306b <span>*ccessVBA<\/span>\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<h4>\uff12-\uff12-\uff12\uff0e\u7f6e\u63db\u3059\u308b\u6642\u306b\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306eUPPER\u3068lower\u3092\u533a\u5225\u3057\u306a\u3044<\/h4>\n<p>\u25a0<span class=\"f-marker-g\">\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9<\/span>\uff08\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e<span>UPPER<\/span>\u3068<span>lower<\/span><strong>\u95a2\u4fc2\u306a\u304f\u7f6e\u63db\u3059\u308b<\/strong>\uff09<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Option Explicit\r\nOption Compare Binary\r\n\r\nSub Sample2_2_2()\r\n    Dim strVal As String\r\n    Dim strRet As String\r\n\r\n    strVal = \"accessVBA\"\r\n    strRet = Replace(strVal, \"a\", \"*\", , , vbTextCompare)\r\n    Debug.Print strRet                  '*ccessVB*\r\n    \r\n    strRet = Replace(strVal, \"A\", \"*\", , , vbTextCompare)\r\n    Debug.Print strRet                  '*ccessVB*\r\nEnd Sub<\/pre>\n<p>9\u884c\u76ee\u89e3\u8aac\u3001\u6587\u5b57\u5217<span>&#8220;accessVBA&#8221; <\/span>\u306b\u3042\u308b <span>&#8220;a&#8221; <\/span>\u3092<span> &#8220;*&#8221; <\/span>\u306b\u7f6e\u63db\u3057\u307e\u3059\u3002<span>1<\/span>\u6587\u5b57\u76ee\u304b\u3089\u3059\u3079\u3066\u3092\u7f6e\u63db\u3057\u307e\u3059\u3002\u6bd4\u8f03\u65b9\u6cd5\u306f <span>Option Compare <\/span>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u300c<span>Option Compare Binary<\/span>\u300d\u3088\u308a\u3001vbTextCompare \u306e\u6307\u5b9a\u304c\u512a\u5148\u3055\u308c\u3001\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e<span>UPPER<\/span>\u3068<span>lower<\/span>\u3092<strong>\u533a\u5225\u3057\u306a\u3044<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u306b <span>*ccessVB*<\/span>\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<br \/>\n\u203b2\u884c\u76ee\u3092\u300c<span>Option Compare Text<\/span>\u300d\u3078\u4fee\u6b63\u3082\u3088\u3044\u306e\u3067\u3059\u304c\u3001\u6a5f\u80fd\u5909\u66f4\u3084\u8ffd\u52a0\u306e\u5834\u5408\u306f\u30e2\u30b8\u30e5\u30fc\u30eb\u30ec\u30d9\u30eb\u5168\u4f53\u306b\u5f71\u97ff\u3055\u308c\u307e\u3059\u306e\u3067\u3001<span>Replace<\/span>\u95a2\u6570\u306e\u6bd4\u8f03\u65b9\u6cd5\u3078\u6307\u5b9a\u3057\u307e\u3057\u305f<\/p>\n<h3><span id=\"-Replace-4\">\uff12-\uff13\uff0eReplace\u95a2\u6570\u306e\u5f15\u6570\u3092\u4f7f\u3063\u305f\u4f7f\u7528\u4f8b<\/span><\/h3>\n<h4>\uff12-\uff13-\uff11\uff0e\u7f6e\u63db\u958b\u59cb\u4f4d\u7f6e\u3092\u6307\u5b9a\u3059\u308b<\/h4>\n<p>\u30fb<span>Replace\u00a0 (<\/span><strong>\u6587\u5b57\u5217<\/strong><span> , <\/span><strong>\u691c\u7d22\u6587\u5b57\u5217<\/strong><span> , <\/span><strong>\u7f6e\u63db\u6587\u5b57\u5217<\/strong> <span>[, <span class=\"f-marker-w\">\u958b\u59cb\u4f4d\u7f6e<\/span><\/span>] [, \u7f6e\u63db\u56de\u6570<span>] [, <\/span>\u6bd4\u8f03\u65b9\u6cd5<span>])<\/span><\/p>\n<pre class=\"prettyprint lang:default decode:true\">Sub Sample2_3_1()\r\n    Dim strVal As String\r\n    Dim strRet As String\r\n\r\n    strVal = \"accessVBA\"\r\n    strRet = Replace(strVal, \"c\", \"*\", 3, , vbTextCompare)\r\n    Debug.Print strRet                  '*essVBA\r\nEnd Sub    <\/pre>\n<p>6\u884c\u76ee\u89e3\u8aac\u3001\u6587\u5b57\u5217<span>&#8220;<\/span>accessVBA&#8221; \u306b\u3042\u308b <span>&#8220;c&#8221; <\/span>\u3092<span> &#8220;*&#8221; <\/span>\u306b\u7f6e\u63db\u3057\u307e\u3059\u30023\u6587\u5b57\u76ee\u304b\u3089\u53d6\u308a\u51fa\u3057\u3092\u958b\u59cb\u3057 \u3059\u3079\u3066\u3092\u7f6e\u63db\u3057\u307e\u3059\u3002\u6bd4\u8f03\u65b9\u6cd5\u306f\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e<span>UPPER<\/span>\u3068<span>lower<\/span>\u3092<strong>\u533a\u5225\u3057\u306a\u3044<\/strong>\u306b\u306a\u308a\u307e\u3059\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u306b *essVBA\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002\u958b\u59cb\u4f4d\u7f6e\u3092 <span>2<\/span>\u306b\u3059\u308b\u3068 **essVBA\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u5f15\u6570\u300c\u958b\u59cb\u4f4d\u7f6e\u300d\u306f\u3001\u958b\u59cb\u4f4d\u7f6e\u304b\u3089\u7f6e\u63db\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u3067\u3057\u305f\u304c\u3001\u3053\u3053\u304b\u3089\u53d6\u308a\u51fa\u3057\u3001\u7f6e\u63db\u958b\u59cb\u3059\u308b\u3068\u3044\u3046\u52d5\u304d\u306b\u306a\u308a\u307e\u3059\u3002\u500b\u4eba\u7684\u306b\u306f<strong>\u300c\u53d6\u308a\u51fa\u3057\u958b\u59cb\u4f4d\u7f6e\u300d<\/strong>\u3068\u3044\u3046\u540d\u524d\u306e\u65b9\u304c\u9069\u3057\u3066\u3044\u307e\u3059\u3002<span>mid<\/span>\u95a2\u6570\u306e\u5f15\u6570\u3068\u540c\u3058\u50cd\u304d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>\uff12-\uff13-\uff12\uff0e\u7f6e\u63db\u56de\u6570\u3092\u6307\u5b9a\u3059\u308b<\/h4>\n<p>\u30fb<span>Replace\u00a0 (<\/span><strong>\u6587\u5b57\u5217<\/strong><span> , <\/span><strong>\u691c\u7d22\u6587\u5b57\u5217<\/strong><span> , <\/span><strong>\u7f6e\u63db\u6587\u5b57\u5217<\/strong> <span>[, <\/span>\u958b\u59cb\u4f4d\u7f6e<span>] [, <span class=\"f-marker-w\">\u7f6e\u63db\u56de\u6570<\/span><\/span>] [, \u6bd4\u8f03\u65b9\u6cd5<span>])<\/span><\/p>\n<pre class=\"prettyprint lang:default decode:true\">Sub Sample2_3_2()\r\n    Dim strVal As String\r\n    Dim strRet As String\r\n\r\n    strVal = \"accessVBA\"\r\n    strRet = Replace(strVal, \"a\", \"*\", 1, 1, vbTextCompare)\r\n    Debug.Print strRet                  '*ccessVBA\r\n    strRet = Replace(strVal, \"a\", \"*\", 1, 0, vbTextCompare)\r\n    Debug.Print strRet                  'accessVBA\r\n    strRet = Replace(strVal, \"a\", \"*\", 1, -1, vbTextCompare)\r\n    Debug.Print strRet                  '*ccessVB*\r\nEnd Sub    <\/pre>\n<p>6\u884c\u76ee\u89e3\u8aac\u3001\u6587\u5b57\u5217<span>&#8220;<\/span>accessVBA&#8221; \u306b\u3042\u308b <span>&#8220;a&#8221; <\/span>\u3092<span> &#8220;*&#8221; <\/span>\u306b\u7f6e\u63db\u3057\u307e\u3059\u3002<span>1<\/span>\u6587\u5b57\u76ee\u304b\u3089\u53d6\u308a\u51fa\u3057\u3092\u958b\u59cb\u3057 <span class=\"f-marker-w\">1\u56de\u306e\u307f\u7f6e\u63db\u3057\u307e\u3059\u3002<\/span>\u6bd4\u8f03\u65b9\u6cd5\u306f\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e<span>UPPER<\/span>\u3068<span>lower<\/span>\u3092<strong>\u533a\u5225\u3057\u306a\u3044<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u306b *ccessVBA\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>8\u884c\u76ee\u89e3\u8aac\u3001\u7f6e\u63db\u56de\u6570\u3092 \u30bc\u30ed\u306b\u3059\u308b\u3068 accessVBA\u3092\u305d\u306e\u307e\u307e\u8fd4\u3057\u307e\u3059\u3002\u958b\u59cb\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u7f6e\u63db\u56de\u6570\u3092 \u30bc\u30ed\u306b\u3059\u308b\u3068<span>mid<\/span>\u95a2\u6570\u3067\u3059\u3002<\/p>\n<p>10\u884c\u76ee\u89e3\u8aac\u3001\u7f6e\u63db\u56de\u6570\u3092<span>(-1)<\/span>\u306b\u3059\u308b\u3068 *ccessVB*\u304c\u51fa\u529b\u3057\u3001<span class=\"f-marker-w\">\u3059\u3079\u3066\u7f6e\u63db\u3055\u308c\u307e\u3059<\/span>\u3002\u56de\u6570\u3092 <span>2<\/span>\u56de\u3001<span>3<\/span>\u56de\u2026\u3068\u6307\u5b9a\u3057\u3066\u3082 *ccessVB*\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002\u7f6e\u63db\u56de\u6570\u3092\u8d85\u3048\u308b\u56de\u6570\u3001\u4f8b\u3048\u3070<span>100<\/span>\u56de\u3068\u6307\u5b9a\u3057\u3066\u3082 *ccessVB*\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002\u3053\u3061\u3089\u306f\u30a4\u30e1\u30fc\u30b8\u901a\u308a\u306e\u52d5\u304d\u3067\u3059\u3002<\/p>\n<h3><span id=\"-Replace-5\">\uff12-\uff14\uff0eReplace\u95a2\u6570\u306e\u623b\u308a\u5024\u3092\u78ba\u8a8d\u3059\u308b<\/span><\/h3>\n<p>\u623b\u308a\u5024\u306f\u6587\u5b57\u5217<span>(string)<\/span>\u5f62\u5f0f\u3067\u3059\u3002<\/p>\n<h4>\uff12-\uff14-\uff11\uff0e\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u306e\u623b\u308a\u5024\u3092\u78ba\u8a8d\u3059\u308b<\/h4>\n<pre class=\"prettyprint lang:default decode:true\">Option Explicit\r\nOption Compare Binary\r\n\r\nSub Sample2_4_1()\r\n    Dim strVal As String\r\n    Dim strRet As String\r\n    \r\n    '\u6587\u5b57\u5217=\"\"\r\n    strRet = Replace(\"\", \"a\", \"b\")\r\n    If strRet = \"\" Then strRet = \"\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217 (\"\")\u3067\u3059\"\r\n    Debug.Print strRet                  '\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217 (\"\")\u3067\u3059\r\n    '\u6587\u5b57\u5217=\"\"\u3001\u691c\u7d22\u6587\u5b57\u5217=\"\"\r\n    strRet = Replace(\"\", \"\", \"b\")\r\n    If strRet = \"\" Then strRet = \"\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217 (\"\")\u3067\u3059\"\r\n    Debug.Print strRet                  '\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217 (\"\")\u3067\u3059\r\n    \r\n    strVal = \"accessVBA\"\r\n    '\u691c\u7d22\u6587\u5b57\u5217=\"\"\r\n    strRet = Replace(strVal, \"\", \"b\")\r\n    Debug.Print strRet                  'accessVBA\r\n    '\u7f6e\u63db\u6587\u5b57\u5217=\"\"\r\n    strRet = Replace(strVal, \"a\", \"\")\r\n    Debug.Print strRet                  'ccessVBA\r\nEnd Sub<\/pre>\n<p>\u4e0b\u8a18\u89e3\u8aac\u3067\u306f<span class=\"f-marker-w\">\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217<\/span>\u306e\u5f15\u6570\u4f4d\u7f6e\u3092\u4e0b\u7dda\u3067\u8868\u3057\u3001\u898b\u3084\u3059\u304f\u3057\u307e\u3059\u3002<\/p>\n<p>\u30fb<span>Replace\u00a0 (<span class=\"f-marker-w\">\u6587\u5b57\u5217<\/span><\/span>\u00a0<span>, <\/span><strong>\u691c\u7d22\u6587\u5b57\u5217<\/strong><span> , <\/span><strong>\u7f6e\u63db\u6587\u5b57\u5217<\/strong> <span>[, <\/span>\u958b\u59cb\u4f4d\u7f6e<span>]<\/span> [, \u7f6e\u63db\u56de\u6570<span>] [, <\/span>\u6bd4\u8f03\u65b9\u6cd5<span>])<\/span><\/p>\n<p>9\u884c\u76ee\u89e3\u8aac\u3001\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217\u306e\u5834\u5408\u306e\u623b\u308a\u5024\u306f\u3069\u306e\u3088\u3046\u306b\u306a\u308b\u306e\u304b\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068 <span>&#8220;&#8221; <\/span>\u3068\u306a\u308a\u307e\u3059\u3002\u4eca\u56de\u3001\u308f\u304b\u308a\u3084\u3059\u304f\u3059\u308b\u305f\u3081<span>If<\/span>\u6587\u3067\u3001&#8221;&#8221;\u306e\u5834\u5408<span>&#8220;<\/span>\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217\u3067\u3059<span>&#8220;<\/span>\u3067\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>\u30fb<span>Replace\u00a0 (<span class=\"f-marker-w\">\u6587\u5b57\u5217<\/span><\/span>\u00a0<span>, <span class=\"f-marker-w\"><strong>\u691c\u7d22\u6587\u5b57\u5217<\/strong><span> <\/span><\/span><\/span><span>, <\/span><strong>\u7f6e\u63db\u6587\u5b57\u5217<\/strong> <span>[, <\/span>\u958b\u59cb\u4f4d\u7f6e<span>]<\/span> [, \u7f6e\u63db\u56de\u6570<span>] [, <\/span>\u6bd4\u8f03\u65b9\u6cd5<span>])<\/span><\/p>\n<p>13\u884c\u76ee\u89e3\u8aac\u3001\u306a\u3089\u3070\u3001\u6587\u5b57\u5217<span>&#8220;&#8221;<\/span>\u306e\u4e2d\u306e<span>&#8220;&#8221;<\/span>\u3092<span>&#8220;b&#8221;<\/span>\u306b\u7f6e\u63db\u3067\u304d\u308b\u304b\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068 <span>&#8220;&#8221; <\/span>\u3068\u306a\u308a\u307e\u3059\u3002\u7f6e\u63db\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u6587\u5b57\u5217\u304c<span>&#8220;&#8221;<\/span>\u306e\u5834\u5408\u306f\u623b\u308a\u5024\u306f<span>&#8220;&#8221;<\/span>\u306e\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u30fb<span>Replace\u00a0 (<\/span><strong>\u6587\u5b57\u5217<\/strong> <span>,<span class=\"f-marker-w\"><span> <\/span><strong>\u691c\u7d22\u6587\u5b57\u5217<\/strong><\/span><\/span><span>\u00a0, <\/span><strong>\u7f6e\u63db\u6587\u5b57\u5217<\/strong> <span>[, <\/span>\u958b\u59cb\u4f4d\u7f6e<span>]<\/span> [, \u7f6e\u63db\u56de\u6570<span>] [, <\/span>\u6bd4\u8f03\u65b9\u6cd5<span>])<\/span><\/p>\n<p>19\u884c\u76ee\u89e3\u8aac\u3001\u691c\u7d22\u6587\u5b57\u5217\u304c\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217\u306e\u5834\u5408\u623b\u308a\u5024\u306f\uff1f\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068accessVBA\u3092\u305d\u306e\u307e\u307e\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u30fb<span>Replace\u00a0 (<\/span><strong>\u6587\u5b57\u5217<\/strong> <span>, <\/span><strong>\u691c\u7d22\u6587\u5b57\u5217<\/strong><span> , <span class=\"f-marker-w\">\u7f6e\u63db\u6587\u5b57\u5217<\/span><\/span>\u00a0<span>[, <\/span>\u958b\u59cb\u4f4d\u7f6e<span>]<\/span> [, \u7f6e\u63db\u56de\u6570<span>] [, <\/span>\u6bd4\u8f03\u65b9\u6cd5<span>])<\/span><\/p>\n<p>22\u884c\u76ee\u89e3\u8aac\u3001\u7f6e\u63db\u6587\u5b57\u5217\u304c\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217\u306e\u5834\u5408\u623b\u308a\u5024\u306f\u3069\u306e\u3088\u3046\u306b\u306a\u308b\u306e\u304b\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068ccessVBA\u3068\u306a\u308a\u307e\u3059\u3002\u6307\u5b9a\u3057\u305f\u691c\u7d22\u6587\u5b57\u5217\u3092\u53d6\u308a\u9664\u304f\u30a4\u30e1\u30fc\u30b8\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><span class=\"f-marker-p\">\u307e\u3068\u3081<\/span><\/p>\n<table border=\"1\" style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.4994%; height: 24px; text-align: center; background-color: #38d983; border-color: #000000;\">\u884c\u6570<\/td>\n<td style=\"width: 17.8075%; height: 24px; text-align: center; background-color: #38d983; border-color: #000000;\">\u6587\u5b57\u5217<\/td>\n<td style=\"width: 16.3459%; height: 24px; text-align: center; background-color: #38d983; border-color: #000000;\">\u691c\u7d22\u6587\u5b57\u5217<\/td>\n<td style=\"width: 16.5896%; height: 24px; text-align: center; background-color: #38d983; border-color: #000000;\">\u7f6e\u63db\u6587\u5b57\u5217<\/td>\n<td style=\"width: 38.7576%; height: 24px; background-color: #38d983; border-color: #000000;\">\u623b\u308a\u5024<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.4994%; height: 24px; text-align: center; border-color: #000000;\">9<\/td>\n<td style=\"width: 17.8075%; height: 24px; text-align: center; border-color: #000000;\">\u201d\u201d<\/td>\n<td style=\"width: 16.3459%; height: 24px; text-align: center; border-color: #000000;\">a<\/td>\n<td style=\"width: 16.5896%; height: 24px; text-align: center; border-color: #000000;\">b<\/td>\n<td style=\"width: 38.7576%; height: 24px; border-color: #000000;\">\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217<span>(&#8220;&#8221;)<\/span><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.4994%; height: 24px; text-align: center; border-color: #000000;\">13<\/td>\n<td style=\"width: 17.8075%; height: 24px; text-align: center; border-color: #000000;\">\u201d\u201d<\/td>\n<td style=\"width: 16.3459%; height: 24px; text-align: center; border-color: #000000;\">&#8220;&#8221;<\/td>\n<td style=\"width: 16.5896%; height: 24px; text-align: center; border-color: #000000;\">b<\/td>\n<td style=\"width: 38.7576%; height: 24px; border-color: #000000;\">\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217<span>(&#8220;&#8221;)<\/span><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.4994%; height: 24px; text-align: center; border-color: #000000;\">19<\/td>\n<td style=\"width: 17.8075%; height: 24px; text-align: center; border-color: #000000;\">accessVBA<\/td>\n<td style=\"width: 16.3459%; height: 24px; text-align: center; border-color: #000000;\">&#8220;&#8221;<\/td>\n<td style=\"width: 16.5896%; height: 24px; text-align: center; border-color: #000000;\">b<\/td>\n<td style=\"width: 38.7576%; height: 24px; border-color: #000000;\">\u6587\u5b57\u5217accessVBA\u3092\u305d\u306e\u307e\u307e\u8fd4\u3059<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.4994%; height: 24px; text-align: center; border-color: #000000;\">22<\/td>\n<td style=\"width: 17.8075%; height: 24px; text-align: center; border-color: #000000;\">accessVBA<\/td>\n<td style=\"width: 16.3459%; height: 24px; text-align: center; border-color: #000000;\">a<\/td>\n<td style=\"width: 16.5896%; height: 24px; text-align: center; border-color: #000000;\">&#8220;&#8221;<\/td>\n<td style=\"width: 38.7576%; height: 24px; border-color: #000000;\">\u6587\u5b57\u5217\u306b\u3042\u308b\u691c\u7d22\u6587\u5b57\u5217&#8221;a&#8221;\u3092&#8221;&#8221;\u306b\u7f6e\u63db\u3057 ccessVBA\u3092\u8fd4\u3059<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\uff12-\uff14-\uff12\uff0e\u958b\u59cb\u4f4d\u7f6e\u3084\u7f6e\u63db\u56de\u6570\u306b\u30bc\u30ed\u3084\u5927\u304d\u306a\u5024\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u306e\u623b\u308a\u5024\u3092\u78ba\u8a8d\u3059\u308b<\/h4>\n<pre class=\"prettyprint lang:default decode:true\">Option Explicit\r\nOption Compare Binary\r\n\r\nSub Sample2_4_2()\r\n    Dim strVal As String\r\n    Dim strRet As String\r\n    \r\n    strVal = \"accessVBA\"\r\n    '\u958b\u59cb\u4f4d\u7f6e\u304c\u6587\u5b57\u5217\u306e\u9577\u30559\r\n    strRet = Replace(strVal, \"a\", \"*\", 9, , vbBinaryCompare)\r\n    Debug.Print strRet                  'A\r\n    '\u958b\u59cb\u4f4d\u7f6e\u304c\u5927\u304d\u306a\u5024\r\n    strRet = Replace(strVal, \"a\", \"*\", 10)\r\n    If strRet = \"\" Then strRet = \"\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217 (\"\")\u3067\u3059\"\r\n    Debug.Print strRet                  '\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217 (\"\")\u3067\u3059\r\n    '\u958b\u59cb\u4f4d\u7f6e\u304c\u5927\u304d\u306a\u5024(Long)\r\n    strRet = Replace(strVal, \"a\", \"*\", 2147483648)\r\n    If strRet = \"\" Then strRet = \"\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217 (\"\")\u3067\u3059\"\r\n    Debug.Print strRet                  '\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\r\n    '\u7f6e\u63db\u56de\u6570\u306f\u521d\u671f\u5024-1\uff08\u3059\u3079\u3066\uff09\r\n    strRet = Replace(strVal, \"a\", \"*\", , -2, vbTextCompare)\r\n    Debug.Print strRet                  '\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\r\n    '\u7f6e\u63db\u56de\u6570\u304c\u30bc\u30ed\u56de\uff08\u7f6e\u63db\u3057\u306a\u3044\uff09\r\n    strRet = Replace(strVal, \"a\", \"*\", , 0, vbTextCompare)\r\n    Debug.Print strRet                  'accessVBA\r\n    '\u7f6e\u63db\u56de\u6570\u304c1\u56de\uff08\u7f6e\u63db\u306f1\u56de\uff09\r\n    strRet = Replace(strVal, \"a\", \"*\", , 2147483648, vbTextCompare)\r\n    Debug.Print strRet                  '\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\r\nEnd Sub<\/pre>\n<p>10\u884c\u76ee\u89e3\u8aac\u3001\u958b\u59cb\u4f4d\u7f6e\u3092<span>&#8220;accessVBA&#8221;<\/span>\u306e\u6587\u5b57\u5217\u306e\u9577\u3055<span>9<\/span>\u3068\u3059\u308b\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068 A\u3068\u306a\u308a\u307e\u3059\u3002\u958b\u59cb\u4f4d\u7f6e\u3092\u2026<span>7,8,9 <\/span>\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u3068\u3001\u623b\u308a\u5024\u306e\u6587\u5b57\u6570\u304c<span>1<\/span>\u6587\u5b57\u305a\u3064\u6e1b\u3063\u3066\u3044\u304f\u305f\u3081\u3001\u6b21\u306e<span>13<\/span>\u884c\u76ee\u306e\u623b\u308a\u5024\u304c<span>\u201d&#8221;<\/span>\u3068\u306a\u308b\u3053\u3068\u304c\u60f3\u50cf\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>13\u884c\u76ee\u89e3\u8aac\u3001\u958b\u59cb\u4f4d\u7f6e\u3092<span>10<\/span>\u306b\u3059\u308b\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068 <span>&#8220;&#8221; <\/span>\u3068\u306a\u308a\u307e\u3059\u3002\u4eca\u56de\u3082\u308f\u304b\u308a\u3084\u3059\u304f<span>If<\/span>\u6587\u3067\u3001&#8221;&#8221;\u306e\u5834\u5408<span>&#8220;<\/span>\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217\u3067\u3059<span>\u201d<\/span>\u3067\u8868\u3057\u307e\u3059\u3002<span>10<\/span>\u884c\u76ee\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3053\u306e\u623b\u308a\u5024\u306b\u7d0d\u5f97\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>17\u884c\u76ee\u89e3\u8aac\u3001\u958b\u59cb\u4f4d\u7f6e\u306e\u30c7\u30fc\u30bf\u578b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001<span>Long<\/span>\u578b\u306e\u6700\u5927\u5024\u30d7\u30e9\u30b9<span>1<\/span>\u3092\u6307\u5b9a\u3059\u308b\u3002\u3059\u308b\u3068\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\u3001\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3068\u306a\u308a\u307e\u3059\u3002<span>21474836487<\/span>\u3068\u3059\u308b\u3068\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/02\/VBA.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2019\/02\/VBA.jpg\" alt=\"\" width=\"426\" height=\"126\" class=\"alignnone size-full wp-image-1398\" \/><\/a><\/p>\n<p>21\u884c\u76ee\u89e3\u8aac\u3001\u7f6e\u63db\u56de\u6570\u306e\u521d\u671f\u5024\u306f<span>-1<\/span>\uff0e\u305d\u308c\u3067\u306f<span>-2<\/span>\u306b\u3059\u308b\u3068\u3069\u3046\u306a\u308b\u306e\u304b\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068\u3053\u3061\u3089\u3082\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\u3001\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>24\u884c\u76ee\u89e3\u8aac\u3001\u7f6e\u63db\u56de\u6570\u3092\u30bc\u30ed\u306f\u3069\u3046\u306a\u308b\u306e\u304b\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068 accessVBA\u3092\u305d\u306e\u307e\u307e\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>27\u884c\u76ee\u89e3\u8aac\u3001\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\u3001\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3068\u306a\u308a\u307e\u3059\u3002<span>21474836487<\/span>\u3068\u3059\u308b\u3068\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p><strong><span class=\"f-marker-g\">\u307e\u3068\u3081<\/span><\/strong><\/p>\n<table border=\"1\" style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr style=\"height: 28px;\">\n<td style=\"width: 10.388%; height: 28px; background-color: #38d983; border-color: #000000; text-align: center;\">\u884c\u6570<\/td>\n<td style=\"width: 18.0616%; height: 28px; background-color: #38d983; border-color: #000000; text-align: center;\">\u6587\u5b57\u5217<\/td>\n<td style=\"width: 12.824%; height: 28px; background-color: #38d983; border-color: #000000; text-align: center;\">\u691c\u7d22\u6587\u5b57\u5217<\/td>\n<td style=\"width: 12.8241%; height: 28px; background-color: #38d983; border-color: #000000; text-align: center;\">\u7f6e\u63db\u6587\u5b57\u5217<\/td>\n<td style=\"width: 15.9909%; height: 28px; background-color: #38d983; border-color: #000000; text-align: center;\">\u958b\u59cb\u4f4d\u7f6e<\/td>\n<td style=\"width: 14.6511%; height: 28px; background-color: #38d983; border-color: #000000; text-align: center;\">\u7f6e\u63db\u56de\u6570<\/td>\n<td style=\"width: 15.2601%; height: 28px; background-color: #38d983; border-color: #000000;\"><strong>\u623b\u308a\u5024<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.388%; height: 24px; border-color: #000000; text-align: center;\"><\/td>\n<td style=\"width: 18.0616%; height: 24px; border-color: #000000; text-align: center;\">accessVBA<\/td>\n<td style=\"width: 12.824%; height: 24px; border-color: #000000; text-align: center;\">a<\/td>\n<td style=\"width: 12.8241%; height: 24px; border-color: #000000; text-align: center;\">*<\/td>\n<td style=\"width: 15.9909%; height: 24px; border-color: #000000; text-align: center;\">7<\/td>\n<td style=\"width: 14.6511%; height: 24px; border-color: #000000; text-align: center;\"><\/td>\n<td style=\"width: 15.2601%; height: 24px; border-color: #000000;\">VBA<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.388%; height: 24px; border-color: #000000; text-align: center;\"><\/td>\n<td style=\"width: 18.0616%; height: 24px; border-color: #000000; text-align: center;\">accessVBA<\/td>\n<td style=\"width: 12.824%; height: 24px; border-color: #000000; text-align: center;\">a<\/td>\n<td style=\"width: 12.8241%; height: 24px; border-color: #000000; text-align: center;\">*<\/td>\n<td style=\"width: 15.9909%; height: 24px; border-color: #000000; text-align: center;\">8<\/td>\n<td style=\"width: 14.6511%; height: 24px; border-color: #000000; text-align: center;\"><\/td>\n<td style=\"width: 15.2601%; height: 24px; border-color: #000000;\">BA<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.388%; height: 24px; border-color: #000000; text-align: center;\">10<\/td>\n<td style=\"width: 18.0616%; height: 24px; border-color: #000000; text-align: center;\">accessVBA<\/td>\n<td style=\"width: 12.824%; height: 24px; border-color: #000000; text-align: center;\">a<\/td>\n<td style=\"width: 12.8241%; height: 24px; border-color: #000000; text-align: center;\">*<\/td>\n<td style=\"width: 15.9909%; height: 24px; border-color: #000000; text-align: center;\">9<\/td>\n<td style=\"width: 14.6511%; height: 24px; border-color: #000000; text-align: center;\"><\/td>\n<td style=\"width: 15.2601%; height: 24px; border-color: #000000;\">A<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.388%; height: 24px; border-color: #000000; text-align: center;\">13<\/td>\n<td style=\"width: 18.0616%; height: 24px; border-color: #000000; text-align: center;\">accessVBA<\/td>\n<td style=\"width: 12.824%; height: 24px; border-color: #000000; text-align: center;\">a<\/td>\n<td style=\"width: 12.8241%; height: 24px; border-color: #000000; text-align: center;\">*<\/td>\n<td style=\"width: 15.9909%; height: 24px; border-color: #000000; text-align: center;\">10<\/td>\n<td style=\"width: 14.6511%; height: 24px; border-color: #000000; text-align: center;\"><\/td>\n<td style=\"width: 15.2601%; height: 24px; border-color: #000000;\">(&#8220;&#8221;)\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.388%; height: 24px; border-color: #000000; text-align: center;\">17<\/td>\n<td style=\"width: 18.0616%; height: 24px; border-color: #000000; text-align: center;\">accessVBA<\/td>\n<td style=\"width: 12.824%; height: 24px; border-color: #000000; text-align: center;\">a<\/td>\n<td style=\"width: 12.8241%; height: 24px; border-color: #000000; text-align: center;\">*<\/td>\n<td style=\"width: 15.9909%; height: 24px; border-color: #000000; text-align: center;\">2147483648<\/td>\n<td style=\"width: 14.6511%; height: 24px; border-color: #000000; text-align: center;\"><\/td>\n<td style=\"width: 15.2601%; height: 24px; border-color: #000000;\">\u5b9f\u884c\u6642\u30a8\u30e9\u30fc<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.388%; height: 24px; border-color: #000000; text-align: center;\"><\/td>\n<td style=\"width: 18.0616%; height: 24px; border-color: #000000; text-align: center;\">accessVBA<\/td>\n<td style=\"width: 12.824%; height: 24px; border-color: #000000; text-align: center;\">a<\/td>\n<td style=\"width: 12.8241%; height: 24px; border-color: #000000; text-align: center;\">*<\/td>\n<td style=\"width: 15.9909%; height: 24px; border-color: #000000; text-align: center;\">2147483647<\/td>\n<td style=\"width: 14.6511%; height: 24px; border-color: #000000; text-align: center;\"><\/td>\n<td style=\"width: 15.2601%; height: 24px; border-color: #000000;\">(&#8220;&#8221;)\u9577\u3055\u30bc\u30ed\u306e\u6587\u5b57\u5217<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.388%; height: 24px; border-color: #000000; text-align: center;\">21<\/td>\n<td style=\"width: 18.0616%; height: 24px; border-color: #000000; text-align: center;\">accessVBA<\/td>\n<td style=\"width: 12.824%; height: 24px; border-color: #000000; text-align: center;\">a<\/td>\n<td style=\"width: 12.8241%; height: 24px; border-color: #000000; text-align: center;\">*<\/td>\n<td style=\"width: 15.9909%; height: 24px; border-color: #000000; text-align: center;\">1<\/td>\n<td style=\"width: 14.6511%; height: 24px; border-color: #000000; text-align: center;\">-2<\/td>\n<td style=\"width: 15.2601%; height: 24px; border-color: #000000;\">\u5b9f\u884c\u6642\u30a8\u30e9\u30fc<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.388%; height: 24px; border-color: #000000; text-align: center;\">24<\/td>\n<td style=\"width: 18.0616%; height: 24px; border-color: #000000; text-align: center;\">accessVBA<\/td>\n<td style=\"width: 12.824%; height: 24px; border-color: #000000; text-align: center;\">a<\/td>\n<td style=\"width: 12.8241%; height: 24px; border-color: #000000; text-align: center;\">*<\/td>\n<td style=\"width: 15.9909%; height: 24px; border-color: #000000; text-align: center;\">1<\/td>\n<td style=\"width: 14.6511%; height: 24px; border-color: #000000; text-align: center;\">0<\/td>\n<td style=\"width: 15.2601%; height: 24px; border-color: #000000;\">\u6587\u5b57\u5217accessVBA\u3092\u305d\u306e\u307e\u307e\u8fd4\u3059<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 10.388%; height: 24px; border-color: #000000; text-align: center;\">27<\/td>\n<td style=\"width: 18.0616%; height: 24px; border-color: #000000; text-align: center;\">accessVBA<\/td>\n<td style=\"width: 12.824%; height: 24px; border-color: #000000; text-align: center;\">a<\/td>\n<td style=\"width: 12.8241%; height: 24px; border-color: #000000; text-align: center;\">*<\/td>\n<td style=\"width: 15.9909%; height: 24px; border-color: #000000; text-align: center;\">1<\/td>\n<td style=\"width: 14.6511%; height: 24px; border-color: #000000; text-align: center;\">2147483648<\/td>\n<td style=\"width: 15.2601%; height: 24px; border-color: #000000;\">\u5b9f\u884c\u6642\u30a8\u30e9\u30fc<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><span id=\"-ReplaceVBA\">\uff12-\uff15\uff0eReplace\u95a2\u6570\u3092\u4f7f\u3063\u305fVBA\u8cc7\u683c\u8a66\u9a13\u306e\u51fa\u984c\u3092\u4e88\u60f3\u3059\u308b<\/span><\/h3>\n<p>[Replace\u95a2\u6570<span>]<\/span>\u3068<span>[Instr<\/span>\u95a2\u6570<span>]<\/span>\u3067\u3059\u3002<span>VBA<\/span>\u8cc7\u683c\u8a66\u9a13\u306b\u4e21\u65b9\u51fa\u984c\u3055\u308c\u307e\u3059\u3002\u4f3c\u305f\u3088\u3046\u306a\u610f\u5473\u306e\u5f15\u6570\u3001\u304b\u3064\u5f15\u6570\u306e\u9806\u756a\u304c\u7570\u306a\u308b\u305f\u3081\u6df7\u4e71\u3092\u8a98\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li><span>Replace\u00a0 (<\/span><strong>\u6587\u5b57\u5217<\/strong><span> , <\/span><strong>\u691c\u7d22\u6587\u5b57\u5217<\/strong><span> , <\/span><strong>\u7f6e\u63db\u6587\u5b57\u5217<\/strong> <span>[, <\/span>\u958b\u59cb\u4f4d\u7f6e<span>]<\/span> [, \u7f6e\u63db\u56de\u6570<span>] [, <\/span>\u6bd4\u8f03\u65b9\u6cd5<span>])<\/span><\/li>\n<li><span>Instr ([<\/span>\u958b\u59cb\u4f4d\u7f6e<span> ,]<\/span><strong>\u6587\u5b57\u5217<\/strong><span> , <\/span><strong>\u691c\u7d22\u6587\u5b57\u5217 <\/strong><span>[, <\/span>\u6bd4\u8f03\u65b9\u6cd5<span>])<\/span><\/li>\n<\/ul>\n<pre class=\"prettyprint lang:default decode:true\">Sub Sample2_5()\r\n    Dim strRet As String\r\n    Dim intRet As Integer\r\n    ' VBA\u8cc7\u683c\u8a66\u9a13 \u51fa\u984c\u4e88\u60f3\r\n    strRet = Replace(\"192.168.191.1\", \"1\", \"*\", 2, 1, 1)\r\n    Debug.Print strRet                  '92.*68.191.1\r\n    intRet = InStr(2, \"192.168.191.1\", \"1\", 1)\r\n    Debug.Print intRet                  '5\r\n    ' Replace\r\n    strRet = Replace(\"abcdABCD\", \"B\", \"*\", 2, 2, vbBinaryCompare)\r\n    Debug.Print strRet                  'bcdA*CD\r\n    strRet = Replace(\"abcdABCD\", \"B\", \"*\", 2, 2, vbTextCompare)\r\n    Debug.Print strRet                  '*cdA*CD\r\nEnd Sub<\/pre>\n<p>5\u884c\u76ee\u306b\u3042\u308b\u6570\u5b57\u306e <span>2 <\/span>\u3084<span> 1 <\/span>\u306f\u958b\u59cb\u4f4d\u7f6e\u306a\u306e\u304b\u7f6e\u63db\u56de\u6570\u306a\u306e\u304b\u3001\u3057\u3063\u304b\u308a\u3068\u7406\u89e3\u3057\u3066\u3044\u306a\u3044\u3068\u6df7\u4e71\u3057\u307e\u3059\u3002<\/p>\n<p>5\u884c\u76ee\u89e3\u8aac\u3001\u6587\u5b57\u5217<span>&#8220;192.168.191.1&#8221; <\/span>\u306b\u3042\u308b <span>&#8220;1&#8221; <\/span>\u3092<span> &#8220;*&#8221; <\/span>\u306b\u7f6e\u63db\u3057\u307e\u3059\u3002<span>2<\/span>\u6587\u5b57\u76ee\u304b\u3089\u53d6\u308a\u51fa\u3057\u3092\u958b\u59cb\u3057<span> 1<\/span>\u56de\u7f6e\u63db\u3057\u307e\u3059\u3002\u6bd4\u8f03\u65b9\u6cd5\u306f\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e<span>UPPER<\/span>\u3068<span>lower<\/span>\u3092<strong>\u533a\u5225\u3057\u306a\u3044<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u306b 92.*68.191.1\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>7\u884c\u76ee\u89e3\u8aac\u3001[Instr\u95a2\u6570<span>]<\/span>\u3067\u3059\u3002\u6587\u5b57\u5217<span>&#8220;192.168.191.1&#8221; <\/span>\u306b\u3042\u308b <span>&#8220;1&#8221; <\/span>\u306e\u898b\u3064\u304b\u3063\u305f\u4f4d\u7f6e\u3092\u8fd4\u3057\u307e\u3059\u3002\u4f46\u3057<span>2<\/span>\u6587\u5b57\u76ee\u304b\u3089\u958b\u59cb\u3057\u3001\u6bd4\u8f03\u65b9\u6cd5\u306f\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e<span>UPPER<\/span>\u3068<span>lower<\/span>\u3092<strong>\u533a\u5225\u3057\u306a\u3044<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002\u5b9f\u884c\u3059\u308b<span>(F5)<\/span>\u3068\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8\u30a6\u30a3\u30f3\u30c9\u30a6\u306b 5\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>10\u884c\u76ee\u3068<span>12<\/span>\u884c\u76ee\u306f\u6bd4\u8f03\u65b9\u6cd5\u3001\u30d0\u30a4\u30ca\u30ea\u30e2\u30fc\u30c9\u3068\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u306e\u623b\u308a\u5024\u306e\u9055\u3044\u306e\u898b\u76f4\u3057\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2><span id=\"i-3\">\uff13\uff0e\u3055\u3044\u3054\u306b<\/span><\/h2>\n<p>[Replace\u95a2\u6570<span>]<\/span>\u3092\u4f7f\u7528\u306e\u5834\u5408\u306f\u3001\u5f15\u6570 \u6bd4\u8f03\u65b9\u6cd5\u306b\u3088\u308a\u3001\u300c\u534a\u89d2\u3068\u5168\u89d2\u3001\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u3001\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306e<span>UPPER<\/span>\u3068<span>lower<\/span>\u3092<strong>\u533a\u5225\u3059\u308b\u3001\u3057\u306a\u3044<\/strong>\u300d\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002\u305d\u3057\u3066\u3001\u6bd4\u8f03\u65b9\u6cd5\u306f\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5ba3\u8a00\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u53c2\u7167\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3001<span>VBE<\/span>\u306e\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3059\u308b\u969b\u306b\u306f\u3001\u308f\u304b\u308a\u3084\u3059\u3044\u6d41\u308c\u3068\u3059\u308b\u3053\u3068\u304c\u3082\u3063\u3068\u3082\u91cd\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u898b\u305f\u76ee\u3082\u3001\u30a4\u30f3\u30c7\u30f3\u30c8\u3084\u3001\u30b3\u30e1\u30f3\u30c8\u3092\u5229\u7528\u3057\u305f\u899a\u66f8\u3092\u3057\u3063\u304b\u308a\u884c\u3044\u307e\u3059\u3002\u305d\u3057\u3066\u3001\u30a8\u30e9\u30fc\u304c\u4eee\u306b\u767a\u751f\u3057\u3066\u3082\u3001\u5bb9\u6613\u306b\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u53ef\u80fd\u306a\u30b3\u30fc\u30c9\u306e\u8a18\u8ff0\u3092\u5e38\u306b\u5fc3\u304c\u3051\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VBA\u3067\u6587\u5b57\u5217\u3092\u7f6e\u63db\u3059\u308b\u3068\u304d\u306b\u306f\u3001[Replace\u95a2\u6570] \u3092\u4f7f\u3046\u3068\u7c21\u5358\u306b\u5b9f\u73fe\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u3053\u3067\u306f\u3001\u5f15\u6570\u306e\u4f7f\u3044\u65b9\u3068\u9055\u3044\u306b\u3064\u3044\u3066\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u8a73\u3057\u304f\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002 \u76ee\u6b21\uff11\uff0e\u3010VBA\u3011Replace\u95a2\u6570\u306b [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":1177,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"acf":[],"_links":{"self":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts\/1393"}],"collection":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/comments?post=1393"}],"version-history":[{"count":9,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts\/1393\/revisions"}],"predecessor-version":[{"id":5775,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts\/1393\/revisions\/5775"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/media\/1177"}],"wp:attachment":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/media?parent=1393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/categories?post=1393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}