{"id":3445,"date":"2015-09-02T12:56:20","date_gmt":"2015-09-02T03:56:20","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=3445"},"modified":"2015-09-02T12:56:20","modified_gmt":"2015-09-02T03:56:20","slug":"datavalidation01","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/datavalidation01\/","title":{"rendered":"\u5165\u529b\u898f\u5247\uff08Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09"},"content":{"rendered":"<h2>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/h2>\n<div class=\"m30-l\">\n<p>\u30bb\u30eb\u7bc4\u56f2\u306b\u5165\u529b\u3067\u304d\u308b\u5024\u3092\u5236\u9650\u3059\u308b\u306b\u306f <strong>\u5165\u529b\u898f\u5247<\/strong> \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002VBA \u3067\u3001\u5165\u529b\u898f\u5247\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001<strong>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u3092\u53d6\u5f97\u3001\u8a2d\u5b9a\u3057\u3001<strong>Add \u30e1\u30bd\u30c3\u30c9<\/strong> \u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Validation<\/strong><\/p><\/div>\n<br \/>\n<h3>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h3>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Range \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<br \/><\/div>\n<\/div>\n<br \/><br \/>\n<h2>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30e1\u30bd\u30c3\u30c9<\/h2>\n<div class=\"m30-l\">\n<h3>Validation.Add \u30e1\u30bd\u30c3\u30c9<\/h3>\n<div class=\"m30-l\">\n<p>\u6307\u5b9a\u3055\u308c\u305f\u30bb\u30eb\u306b <strong>\u5165\u529b\u898f\u5247<\/strong> \u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u305d\u3053\u306b\u3001\u3059\u3067\u306b\u5165\u529b\u898f\u5247\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/p><\/div>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Add<\/strong> ( <em>type<\/em> [, <em>alertstyle<\/em>, <em>operator<\/em>, <em>formula1<\/em>, <em>formula2<\/em> ] )<\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>type&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5165\u529b\u898f\u5247\u306e\u7a2e\u985e\u3092\u8868\u3059 <strong>XlDVType \u5217\u6319\u578b<\/strong> \u306e\u5b9a\u6570\u307e\u305f\u306f\u3001\u305d\u306e\u5024\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n<table id=\"xldvtype_list\">\n<tr>\n<td align = \"center\" width=\"250\" bgcolor=\"#ffffccc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"80\" bgcolor=\"#ffffccc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"320\" bgcolor=\"#ffffccc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlValidateInputOnly<\/td>\n<td width=\"80\" align = \"center\">0<\/td>\n<td width=\"320\" >\u3059\u3079\u3066\u306e\u5024<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlValidateWholeNumber<\/td>\n<td width=\"80\" align = \"center\">1<\/td>\n<td width=\"320\" >\u6574\u6570<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlValidateDecimal<\/td>\n<td width=\"80\" align = \"center\">2<\/td>\n<td width=\"320\" >\u5c0f\u6570\u70b9\u6570<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlValidateList<\/td>\n<td width=\"80\" align = \"center\">3<\/td>\n<td width=\"320\" >\u30ea\u30b9\u30c8<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlValidateDate<\/td>\n<td width=\"80\" align = \"center\">4<\/td>\n<td width=\"320\" >\u65e5\u4ed8<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlValidateTime<\/td>\n<td width=\"80\" align = \"center\">5<\/td>\n<td width=\"320\" >\u6642\u523b<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlValidateTextLength<\/td>\n<td width=\"80\" align = \"center\">6<\/td>\n<td width=\"320\" >\u6587\u5b57\u5217\u306e\u9577\u3055<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlValidateCustom<\/td>\n<td width=\"80\" align = \"center\">7<\/td>\n<td width=\"320\" >\u4efb\u610f\u306e\u6570\u5f0f\u3092\u4f7f\u7528<\/td>\n<\/tr>\n<\/table>\n<p>\n      <\/li>\n<li>alertstyle&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5165\u529b\u898f\u5247\u3067\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u8868\u3059 <strong>XlDVAlertStyle \u5217\u6319\u578b<\/strong> \u306e\u5b9a\u6570\u307e\u305f\u306f\u3001\u305d\u306e\u5024\u3092\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n<table>\n<tr>\n<td align = \"center\" width=\"250\" bgcolor=\"#ffffccc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"80\" bgcolor=\"#ffffccc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"320\" bgcolor=\"#ffffccc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlValidAlertStop<\/td>\n<td width=\"80\" align = \"center\">1<\/td>\n<td width=\"320\" >\u4e2d\u6b62<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlValidAlertWarning<\/td>\n<td width=\"80\" align = \"center\">2<\/td>\n<td width=\"320\" >\u8b66\u544a<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlValidAlertInformation<\/td>\n<td width=\"80\" align = \"center\">3<\/td>\n<td width=\"320\" >\u60c5\u5831<\/td>\n<\/tr>\n<\/table>\n<p>\n      <\/li>\n<li>operator&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u6761\u4ef6\u5f0f\u306e\u6f14\u7b97\u5b50\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<strong>XlFormatConditionOperator \u5217\u6319\u578b<\/strong> \u306e\u5b9a\u6570\u307e\u305f\u306f\u3001\u305d\u306e\u5024\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n<table id=\"xlformatconditionoperator_list\">\n<tr>\n<td align = \"center\" width=\"250\" bgcolor=\"#ffffccc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"80\" bgcolor=\"#ffffccc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"320\" bgcolor=\"#ffffccc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlBetween<\/td>\n<td width=\"80\" align = \"center\">1<\/td>\n<td width=\"320\" >2 \u3064\u306e\u5f0f\u306e\u9593\uff08\u5f0f\u304c2\u3064\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306e\u307f\uff09<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlNotBetween<\/td>\n<td width=\"80\" align = \"center\">2<\/td>\n<td width=\"320\">2 \u3064\u306e\u5f0f\u306e\u9593\u4ee5\u5916\uff08\u5f0f\u304c2\u3064\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306e\u307f\uff09<\/td>\n<\/tr>\n<\/tr>\n<tr>\n<td width=\"250\">xlEqual<\/td>\n<td width=\"80\" align = \"center\">3<\/td>\n<td width=\"320\"><em>formula1<\/em> \u306b\u7b49\u3057\u3044<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlNotEqual<\/td>\n<td width=\"80\" align = \"center\">4<\/td>\n<td width=\"320\" ><em>formula1<\/em> \u3068\u7b49\u3057\u304f\u306a\u3044<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlGreater<\/td>\n<td width=\"80\" align = \"center\">5<\/td>\n<td width=\"320\" ><em>formula1<\/em> \u3088\u308a\u5927\u304d\u3044<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlLess<\/td>\n<td width=\"80\" align = \"center\">6<\/td>\n<td width=\"320\" ><em>formula1<\/em> \u3088\u308a\u5c0f\u3055\u3044<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlGreaterEqual<\/td>\n<td width=\"80\" align = \"center\">7<\/td>\n<td width=\"320\" ><em>formula1<\/em> \u4ee5\u4e0a<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlLessEqual<\/td>\n<td width=\"80\" align = \"center\">8<\/td>\n<td width=\"320\" ><em>formula1<\/em> \u4ee5\u4e0b<\/td>\n<\/tr>\n<\/table>\n<p>\n      <\/li>\n<li>formula1&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u6700\u521d\u306e\u6761\u4ef6\u5f0f\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>formula2&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\uff12\u756a\u76ee\u306e\u6761\u4ef6\u5f0f\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u5f15\u6570 <em>operator<\/em> \u304c <strong>xlBetween<\/strong> \u307e\u305f\u306f <strong>xlNotBetween<\/strong> \u4ee5\u5916\u306e\u5834\u5408\u3001\u3053\u306e\u5f15\u6570\u306f\u7121\u8996\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/><br \/>\n<h3>Validation.Delete \u30e1\u30bd\u30c3\u30c9<\/h3>\n<div class=\"m30-l\">\n<p>\u6307\u5b9a\u3055\u308c\u305f\u30bb\u30eb\u7bc4\u56f2\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b <strong>\u5165\u529b\u898f\u5247<\/strong> \u3092\u30af\u30ea\u30a2\u3057\u307e\u3059\u3002\n  <\/div>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Delete<\/strong><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/><br \/>\n<h3>Validation.Modify \u30e1\u30bd\u30c3\u30c9<\/h3>\n<div class=\"m30-l\">\n<p>\u6307\u5b9a\u3055\u308c\u305f\u30bb\u30eb\u7bc4\u56f2\u306e <strong>\u5165\u529b\u898f\u5247<\/strong> \u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<\/p><\/div>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Modify<\/strong> ( <em>type<\/em> [, <em>alertstyle<\/em>, <em>operator<\/em>, <em>formula1<\/em>, <em>formula2<\/em> ] )<\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>Modify \u30e1\u30bd\u30c3\u30c9<\/strong> \u306e\u5f15\u6570\u306f\u3001<strong>Add \u30e1\u30bd\u30c3\u30c9<\/strong> \u3068\u540c\u3058\u306a\u306e\u3067\u3001\u8a73\u7d30\u306f\u3001<strong>Add \u30e1\u30bd\u30c3\u30c9<\/strong>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/p><\/div>\n<\/div>\n<br \/><br \/>\n<h2>\u5165\u529b\u898f\u5247\u306e\u8a2d\u5b9a\u306b\u95a2\u3059\u308b\u30d7\u30ed\u30d1\u30c6\u30a3<\/h2>\n<div class=\"m30-l\">\n<p>\u3053\u3053\u3067\u3001\u8a2d\u5b9a\u307e\u305f\u306f\u53d6\u5f97\u3067\u304d\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u3001Excel\u3067\u306f\u3001\u300c\u30c7\u30fc\u30bf\u306e\u5165\u529b\u898f\u5247\u300d\u30c0\u30a4\u30a2\u30ed\u30b0\u30dc\u30c3\u30af\u30b9\u306e\u300c\u8a2d\u5b9a\u300d\u30bf\u30d6\u3067\u3001\u78ba\u8a8d\u3067\u304d\u308b\u5185\u5bb9\u3067\u3059\u3002<\/p>\n<br \/>\n<h3>Validation.InCellDropdown \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<div class=\"m30-l\">\n<p>\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u3092\u5229\u7528\u3057\u3066\u5024\u3092\u5165\u529b\u3059\u308b\u304b\u3069\u3046\u304b\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<strong>True<\/strong> \u306b\u8a2d\u5b9a\u3057\u3001\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u7a2e\u985e\u304c\u300c\u4e2d\u6b62\u300d\u306e\u5834\u5408\u3001\u6307\u5b9a\u3057\u305f\u30ea\u30b9\u30c8\u304b\u3089\u3057\u304b\u5024\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\uff08\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u7a2e\u985e\u304c\u300c\u8b66\u544a\u300d\u300c\u60c5\u5831\u300d\u306e\u5834\u5408\u306f\u5165\u529b\u53ef\u80fd\u3067\u3059\uff09\u3002<br \/>\n      \u30ea\u30b9\u30c8\u306e\u30c7\u30fc\u30bf\u306f\u3001<strong>Validation.Add \u30e1\u30bd\u30c3\u30c9<\/strong> \u307e\u305f\u306f\u3001<strong>Validation.Modify \u30e1\u30bd\u30c3\u30c9<\/strong> \u306e\u5f15\u6570 <em>formula1<\/em> \u3067\u3001\u30ea\u30b9\u30c8\u30c7\u30fc\u30bf\u304c\u5165\u529b\u3055\u308c\u3066\u3044\u308b\u30bb\u30eb\u7bc4\u56f2\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u306f\u3001\u300c<em>formula1<\/em> = &#8220;AAA,BBB,CCC&#8221;\u300d\u306e\u3088\u3046\u306b\u3001\u30ab\u30f3\u30de\uff08,\uff09\u3067\u533a\u5207\u3063\u3066\u76f4\u63a5\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/p><\/div>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>InCellDropdown<\/strong> = <em>boolean<\/em><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>boolean&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5165\u529b\u898f\u5247\u3067\u5165\u529b\u53ef\u80fd\u306a\u5024\u3092\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u3067\u8868\u793a\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u3001\u30d6\u30fc\u30eb\u578b\uff08Boolean\uff09\u306e\u5024\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002\uff08\u203b \u5024\u306e\u53d6\u5f97\u304a\u3088\u3073\u8a2d\u5b9a\u304c\u53ef\u80fd\u3067\u3059\u3002\uff09<\/li>\n<\/ul><\/div>\n<br \/><br \/>\n<h3>Validation.IgnoreBlank \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<div class=\"m30-l\">\n<p>\u7a7a\u767d\u5024\u306e\u5165\u529b\u3092\u8a31\u53ef\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<\/p><\/div>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>IgnoreBlank<\/strong> = <em>boolean<\/em><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>boolean&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5165\u529b\u898f\u5247\u306b\u304a\u3044\u3066\u7279\u5b9a\u306e\u30bb\u30eb\u7bc4\u56f2\u3078\u306e\u7a7a\u767d\u5024\u306e\u5165\u529b\u3092\u8a31\u53ef\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u30d6\u30fc\u30eb\u578b\uff08Boolean\uff09\u306e\u5024\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<strong>True<\/strong> \u306e\u5834\u5408\u7a7a\u767d\u5024\u306e\u5165\u529b\u3092\u8a31\u53ef\u3057\u307e\u3059\u3002\uff08\u203b \u5024\u306e\u53d6\u5f97\u304a\u3088\u3073\u8a2d\u5b9a\u304c\u53ef\u80fd\u3067\u3059\u3002\uff09<\/li>\n<\/ul><\/div>\n<br \/><br \/>\n<h3>Validation.Type \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<div class=\"m30-l\">\n<p>\u5165\u529b\u898f\u5247\u306e\u7a2e\u985e\u3092\u8868\u3059\u9577\u6574\u6570\u578b\uff08Long\uff09\u306e\u5024\uff08<a href=\"#xldvtype_list\">XlDVType \u5217\u6319\u578b<\/a> \u306e\u5b9a\u6570\u3092\u4f7f\u7528\uff09\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<\/p><\/div>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Type<\/strong><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/><br \/>\n<h3>Validation.Operator \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<div class=\"m30-l\">\n<p>\u5165\u529b\u898f\u5247\u3067\u5165\u529b\u3059\u308b\u5024\u3092\u5236\u9650\u3059\u308b\u305f\u3081\u306e\u6761\u4ef6\u5f0f\u306e\u6f14\u7b97\u5b50\u3092\u8868\u3059\u9577\u6574\u6570\u578b\uff08Long\uff09\u306e\u5024\uff08<a href=\"#xlformatconditionoperator_list\">XlFormatConditionOperator \u5217\u6319\u578b<\/a> \u306e\u5b9a\u6570\u3092\u4f7f\u7528\uff09\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<\/p><\/div>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Operator<\/strong> = <em>const<\/em><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/><br \/>\n<h3>Validation.Formula1 \u30d7\u30ed\u30d1\u30c6\u30a3 \uff0f Validation.Formula2 \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<div class=\"m30-l\">\n<p>\u5165\u529b\u898f\u5247\u3067\u306e\u6761\u4ef6\u5f0f\u306e\u5185\u5bb9\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u8a2d\u5b9a\u306f\u3001<strong>Validation.Add \u30e1\u30bd\u30c3\u30c9<\/strong> \u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n<\/p><\/div>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\u6700\u521d\u306e\u6761\u4ef6\u5f0f\u306e\u5185\u5bb9<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>Formula1<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff12\u756a\u76ee\u306e\u6761\u4ef6\u5f0f\u306e\u5185\u5bb9<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>Formula2<\/strong><\/p>\n<p>    \u203b \u3044\u305a\u308c\u3082\u3001\u5024\u306e\u53d6\u5f97\u306e\u307f\u53ef\u80fd\u3067\u3059\u3002\n  <\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/><br \/>\n<h3>Validation.Value \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<div class=\"m30-l\">\n<p>\u30bb\u30eb\u306e\u30c7\u30fc\u30bf\u304c\u5165\u529b\u898f\u5247\u306b\u5408\u3063\u305f\u6709\u52b9\u306a\u30c7\u30fc\u30bf\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u793a\u3059\u30d6\u30fc\u30eb\u578b\uff08Boolean\uff09\u306e\u5024\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Value<\/strong><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<\/div>\n<br \/><br \/>\n<h2>\u5165\u529b\u898f\u5247 \u4f7f\u7528\u4f8b<\/h2>\n<div class=\"m30-l\">\n<h3 id=\"vba_sample\">\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9<\/h3>\n<pre class=\"lang:vb mark:0 decode:true \" title=\"\u5165\u529b\u898f\u5247 \u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample01_Validation()\r\n\r\n    With Range(\"B2\").Validation\r\n            \r\n        '\u5165\u529b\u898f\u5247\u3092\u524a\u9664\r\n        .Delete\r\n        \r\n        '\u5165\u529b\u898f\u5247\u306e\u8a2d\u5b9a\uff1a\u6587\u5b57\u6570\u5236\u9650\uff085\u6587\u5b57\u4ee5\u4e0b\uff09\r\n        .Add Type:=xlValidateTextLength, _\r\n                   Operator:=xlLessEqual, _\r\n                   Formula1:=5\r\n\r\n        '\u7a7a\u767d\u5024\u306e\u5165\u529b\u3092\u8a31\u53ef\r\n        .IgnoreBlank = True\r\n        \r\n    \r\n    End With\r\n\u3000\r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p><a href=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/validation_001.jpg?ssl=1\" rel=\"lightbox[3445]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/validation_001.jpg?resize=580%2C312&#038;ssl=1\" alt=\"Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3000\u4f7f\u7528\u4f8b01\" width=\"580\" height=\"312\" class=\"alignnone size-large wp-image-3449\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/validation_001.jpg?resize=580%2C312&amp;ssl=1 580w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/validation_001.jpg?resize=400%2C215&amp;ssl=1 400w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/08\/validation_001.jpg?w=828&amp;ssl=1 828w\" sizes=\"(max-width: 580px) 100vw, 580px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/>\n","protected":false},"excerpt":{"rendered":"<p>Validation \u30aa\u30d6\u30b8\u30a7\u30af\u30c8 \u30bb\u30eb\u7bc4\u56f2\u306b\u5165\u529b\u3067\u304d\u308b\u5024\u3092\u5236\u9650\u3059\u308b\u306b\u306f \u5165\u529b\u898f &#8230; <\/p>\n","protected":false},"author":1,"featured_media":3496,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[268],"tags":[270,538,539,540,541,63,38,269],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/validation_001-580x312.jpg?fit=580%2C312&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-Tz","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3445"}],"collection":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/comments?post=3445"}],"version-history":[{"count":9,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3445\/revisions"}],"predecessor-version":[{"id":3495,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3445\/revisions\/3495"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/3496"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=3445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=3445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=3445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}