{"id":4389,"date":"2024-06-20T12:00:43","date_gmt":"2024-06-20T03:00:43","guid":{"rendered":"https:\/\/www.bold.ne.jp\/engineer-club\/?p=4389"},"modified":"2025-12-19T12:31:22","modified_gmt":"2025-12-19T03:31:22","slug":"vba-dim","status":"publish","type":"post","link":"https:\/\/www.bold.ne.jp\/engineer-club\/vba-dim","title":{"rendered":"VBA\u306eDim\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3068\u306f\uff1fDim\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"<p>VBA\u306b\u89e6\u308c\u308b\u969b\u306b\u3001\u5fc5\u305a\u3068\u3044\u3044\u3063\u3066\u3044\u3044\u307b\u3069\u898b\u304b\u3051\u308b\u306e\u304c\u300c<span>Dim<\/span>\u300d\u3068\u3044\u3046\u6587\u5b57\u5217\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u3001<span>Dim<\/span>\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\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=\"#VBADim\">\uff11\uff0eVBA\u306eDim\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306b\u3064\u3044\u3066<\/a><ul><li><a href=\"#-Dim\">\uff11-\uff11\uff0eDim\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3068\u306f<\/a><\/li><li><a href=\"#-Dim-2\">\uff11-\uff12\uff0eDim\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u4f7f\u3044\u65b9<\/a><\/li><\/ul><\/li><li><a href=\"#VBA_Dim\">\uff12\uff0eVBA Dim\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u4f7f\u7528\u4f8b<\/a><ul><li><a href=\"#i\">\uff12-\uff11\uff0e\u57fa\u672c\u7684\u306a\u4f7f\u7528\u4f8b<\/a><\/li><li><a href=\"#i-2\">\uff12-\uff12\uff0e\u7279\u6b8a\u306a\u66f8\u304d\u65b9\u3092\u3059\u308b\u5834\u5408<\/a><\/li><li><a href=\"#i-3\">\uff12-\uff13\uff0e\u81ea\u52d5\u578b\u5909\u63db<\/a><\/li><li><a href=\"#i-4\">\uff12-\uff14\uff0e\u305d\u306e\u4ed6\u306e\u4f7f\u7528\u4f8b<\/a><\/li><\/ul><\/li><li><a href=\"#i-5\">\uff13\uff0e\u6700\u5f8c\u306b<\/a><\/li><\/ul><\/div>\n<h2><span id=\"VBADim\"><span>\uff11\uff0eVBA\u306eDim<\/span>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306b\u3064\u3044\u3066<\/span><\/h2>\n<h3><span id=\"-Dim\"><span>\uff11-\uff11\uff0eDim<\/span>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3068\u306f<\/span><\/h3>\n<p><span>Dim<\/span>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u3001<strong><\/strong><span class=\"f-marker-p\"><strong>\u5909\u6570\u306e\u578b\u3084\u540d\u524d\u3092\u5ba3\u8a00\u3059\u308b\u969b\u306b\u4f7f\u7528<\/strong><\/span>\u3057\u307e\u3059\u3002\u300c\u7269\u306e\u5927\u304d\u3055\u300d\u3084\u300c\u7bc4\u56f2\u300d\u3068\u3044\u3063\u305f\u610f\u5473\u3092\u6301\u3064\u300c<span>Dimension<\/span>\u300d\u304c\u540d\u524d\u306e\u5143\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3><span id=\"-Dim-2\"><span>\uff11-\uff12\uff0eDim<\/span>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u4f7f\u3044\u65b9<\/span><\/h3>\n<p><span>Dim [<\/span>\u5909\u6570\u540d<span>] ([<\/span>\u914d\u5217\u306e\u6b21\u5143\u6570<span>]) as [<\/span>\u30c7\u30fc\u30bf\u578b<span>] <\/span><\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 97px;\">\n<tbody>\n<tr style=\"height: 25px;\">\n<td style=\"width: 24.4856%; height: 25px;\">\u69cb\u6587\u306e\u30d1\u30fc\u30c4<\/td>\n<td style=\"width: 26.2345%; height: 25px;\">\u5fc5\u9808\uff0f\u7701\u7565<\/td>\n<td style=\"width: 49.2798%; height: 25px;\">\u8aac\u660e<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.4856%; height: 24px;\">\u5909\u6570\u540d<\/td>\n<td style=\"width: 26.2345%; height: 24px;\">\u5fc5\u9808<\/td>\n<td style=\"width: 49.2798%; height: 24px;\">\u5909\u6570\u306e\u540d\u524d\u3092\u8a2d\u5b9a<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.4856%; height: 24px;\">\u914d\u5217\u306e\u6b21\u5143\u6570<\/td>\n<td style=\"width: 26.2345%; height: 24px;\">\u7701\u7565\u53ef\u80fd<\/td>\n<td style=\"width: 49.2798%; height: 24px;\">\u914d\u5217\u5909\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u6642\u306b\u306e\u307f\u8a2d\u5b9a<br \/>\n\u5404\u6b21\u5143\u306e\u8981\u7d20\u6570\u3092\u8a2d\u5b9a<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.4856%; height: 24px;\">\u30c7\u30fc\u30bf\u578b<\/td>\n<td style=\"width: 26.2345%; height: 24px;\">\u7701\u7565\u53ef\u80fd<\/td>\n<td style=\"width: 49.2798%; height: 24px;\">\u5909\u6570\u306e\u578b\u3092\u8a2d\u5b9a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\uff11-\uff12-\uff11\uff0e\u6307\u5b9a\u3059\u308b\u30c7\u30fc\u30bf\u578b\u306e\u7a2e\u985e<\/h4>\n<p>\u5909\u6570\u306e\u578b\u306f\u6570\u591a\u304f\u3042\u308b\u305f\u3081\u3001\u4f7f\u7528\u983b\u5ea6\u304c\u9ad8\u3044\u3082\u306e\u3092\u3042\u3052\u3066\u3044\u304d\u307e\u3059\u3002\u3053\u308c\u4ee5\u5916\u306b\u3082\u3001\u30e6\u30fc\u30b6\u30fc\u81ea\u8eab\u304c\u578b\u3092\u5b9a\u7fa9\u3067\u304d\u308b\u6a5f\u80fd\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 168px;\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.1522%; height: 24px;\">\u30c7\u30fc\u30bf\u578b\u540d<\/td>\n<td style=\"width: 23.6625%; height: 24px;\">\u540d\u79f0<\/td>\n<td style=\"width: 60.1852%; height: 24px;\">\u5024\u306e\u7bc4\u56f2<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.1522%; height: 24px;\">Date<\/td>\n<td style=\"width: 23.6625%; height: 24px;\">\u65e5\u4ed8\u578b<\/td>\n<td style=\"width: 60.1852%; height: 24px;\">\u897f\u66a6<span>100<\/span>\u5e74<span>1<\/span>\u6708<span>1<\/span>\u65e5\uff5e\u897f\u66a6<span>9999<\/span>\u5e74<span>12<\/span>\u6708<span>31<\/span>\u65e5<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.1522%; height: 24px;\">Long<\/td>\n<td style=\"width: 23.6625%; height: 24px;\">\u9577\u6574\u6570\u578b<\/td>\n<td style=\"width: 60.1852%; height: 24px;\">-2,147, 483,648\uff5e<span>2,147, 483,647<\/span><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.1522%; height: 24px;\">Integer<\/td>\n<td style=\"width: 23.6625%; height: 24px;\">\u6574\u6570\u578b<\/td>\n<td style=\"width: 60.1852%; height: 24px;\">-32,768\uff5e<span>2,767<br \/>\n\u4e0a\u8a18\u7bc4\u56f2\u3092\u8d85\u3048\u305f\u5024\u3092\u4f7f\u7528\u3057\u305f\u3044\u5834\u5408\u306fLong\u578b\u3092\u4f7f\u3046<\/span><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.1522%; height: 24px;\">String<\/td>\n<td style=\"width: 23.6625%; height: 24px;\">\u6587\u5b57\u5217\u578b<\/td>\n<td style=\"width: 60.1852%; height: 24px;\">0\uff5e\u7d04<span>20<\/span>\u5104\u30d0\u30a4\u30c8\u5206\u306e\u6587\u5b57\u5217<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.1522%; height: 24px;\">Double<\/td>\n<td style=\"width: 23.6625%; height: 24px;\">\u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u578b<\/td>\n<td style=\"width: 60.1852%; height: 24px;\">\u8ca0\u306e\u5024\u306e\u7bc4\u56f2\u306f<span> -1.79769313486231E308 <\/span>\uff5e<span> -4.94065645841247E-324<br \/>\n\u6b63\u306e\u5024\u306e\u7bc4\u56f2\u306f 4.94065645841247E-324 \uff5e 1.79769313486232E308<br \/>\n<\/span><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 16.1522%; height: 24px;\">Variant<\/td>\n<td style=\"width: 23.6625%; height: 24px;\">\u30d0\u30ea\u30a2\u30f3\u30c8\u578b<\/td>\n<td style=\"width: 60.1852%; height: 24px;\">\u6700\u5927\u3067<span> Double <\/span>\u306e\u7bc4\u56f2\u307e\u3067\u306e\u4efb\u610f\u306e\u6570\u5024<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span id=\"VBA_Dim\">\uff12\uff0eVBA <span>Dim<\/span>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u4f7f\u7528\u4f8b<\/span><\/h2>\n<h3><span id=\"i\">\uff12-\uff11\uff0e\u57fa\u672c\u7684\u306a\u4f7f\u7528\u4f8b<\/span><\/h3>\n<h4>\uff12-\uff11-\uff11\uff0e\u5909\u6570\u306e\u5ba3\u8a00<\/h4>\n<p><span>Dim [<\/span>\u5909\u6570\u540d<span>] as [<\/span>\u30c7\u30fc\u30bf\u578b\u540d<span>]<\/span><\/p>\n<p>\u5ba3\u8a00\u3059\u308b\u540d\u524d\u306f\u3001\u65e5\u672c\u8a9e\u3067\u3082\u53ef\u80fd\u3067\u3059<\/p>\n<p>\u4f8b\uff09<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Dim \u4ef6\u6570 as String<\/pre>\n<h4>\uff12-\uff11-\uff12\uff0e\u914d\u5217\u306e\u5ba3\u8a00<\/h4>\n<p>\u6587\u5b57\u5217\u306e<span>1<\/span>\u6b21\u5143\u914d\u5217\u306e\u5834\u5408<\/p>\n<p>\u4f8b\uff09<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Dim [\u914d\u5217\u540d](\u8981\u7d20\u6570 - 1) as [\u30c7\u30fc\u30bf\u578b\u540d]<\/pre>\n<p>&nbsp;<\/p>\n<p>\u6587\u5b57\u5217\u306e<span>2<\/span>\u6b21\u5143\u914d\u5217\u306e\u5834\u5408<\/p>\n<p>\u4f8b\uff09<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Dim [\u914d\u5217\u540d](\u8981\u7d20\u65701 - 1, \u8981\u7d20\u65702 - 1) as [\u30c7\u30fc\u30bf\u578b\u540d]<\/pre>\n<p>\u203b\u914d\u5217\u306e\u6b21\u5143\u6570\u304c\u300c<span>-1<\/span>\u300d\u3092\u3057\u3066\u3044\u308b\u306e\u306f\u3001\u914d\u5217\u306e\u8981\u7d20\u304c\u300c<span>0<\/span>\u300d\u304b\u3089\u59cb\u307e\u308b\u305f\u3081\u3067\u3059<\/p>\n<h3><span id=\"i-2\">\uff12-\uff12\uff0e\u7279\u6b8a\u306a\u66f8\u304d\u65b9\u3092\u3059\u308b\u5834\u5408<\/span><\/h3>\n<h4>\uff12-\uff12-\uff11\uff0e\u5909\u6570\u306e\u578b\u3092\u8a2d\u5b9a\u3057\u306a\u3044<\/h4>\n<p>\u578b\u3092\u8a2d\u5b9a\u3057\u306a\u3044\u3067\u5909\u6570\u3092\u5ba3\u8a00\u3057\u305f\u5834\u5408\u3001\u5909\u6570\u306e\u578b\u306f\u300c<span>Variant<\/span>\u300d\u3067\u5b9a\u7fa9\u3055\u308c\u307e\u3059<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Sub sample1()\r\n    Dim var1\r\n    \r\n    var1 = 1\r\n\r\nEnd Sub<\/pre>\n<p>\u578b\u306e\u78ba\u8a8d<\/p>\n<p>\u5b9f\u884c\u6642\u306b\u3001\u30a6\u30a9\u30c3\u30c1\u5185\u306e\u578b\u304c\u300c<span>Variant<\/span>\uff0f<strong>Empty<\/strong>\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff08<span>Empty<\/span>\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u306f\u3001\u5024\u304c\u5165\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u578b\u304c\u672a\u5b9a\u306e\u305f\u3081\uff09<\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/vba-dim\/%e3%82%a6%e3%82%a9%e3%83%83%e3%83%81%e5%86%85%e3%81%ae%e5%9e%8b%e3%81%8c%e3%80%8cvariant%ef%bc%8fempty%e3%80%8d%e3%81%ab%e3%81%aa%e3%81%a3%e3%81%a6%e3%81%84%e3%81%be%e3%81%99-2\" rel=\"attachment wp-att-4393\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u30a6\u30a9\u30c3\u30c1\u5185\u306e\u578b\u304c\u300cVariant\uff0fEmpty\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059-1.png\" alt=\"\u30a6\u30a9\u30c3\u30c1\u5185\u306e\u578b\u304c\u300cVariant\uff0fEmpty\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059\" width=\"1001\" height=\"370\" class=\"alignnone size-full wp-image-4393\" srcset=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u30a6\u30a9\u30c3\u30c1\u5185\u306e\u578b\u304c\u300cVariant\uff0fEmpty\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059-1.png 1001w, https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u30a6\u30a9\u30c3\u30c1\u5185\u306e\u578b\u304c\u300cVariant\uff0fEmpty\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059-1-768x284.png 768w\" sizes=\"(max-width: 1001px) 100vw, 1001px\" \/><\/a><\/p>\n<p>\u5909\u6570\u306b\u5024\uff08\u6570\u5b57\u306e\u300c<span>1<\/span>\u300d\uff09\u304c\u8a2d\u5b9a\u3055\u308c\u308b\u3068\u3001\u300c<span>Variant\/<strong>Integer<\/strong><\/span>\u300d\u306b\u5909\u66f4\u3055\u308c\u308b<\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/vba-dim\/%e5%a4%89%e6%95%b0%e3%81%ab%e5%80%a4%ef%bc%88%e6%95%b0%e5%ad%97%e3%81%ae%e3%80%8c1%e3%80%8d%ef%bc%89%e3%81%8c%e8%a8%ad%e5%ae%9a%e3%81%95%e3%82%8c%e3%82%8b%e3%81%a8%e3%80%81%e3%80%8cvariant%ef%bc%8fi-2\" rel=\"attachment wp-att-4394\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u5909\u6570\u306b\u5024\uff08\u6570\u5b57\u306e\u300c1\u300d\uff09\u304c\u8a2d\u5b9a\u3055\u308c\u308b\u3068\u3001\u300cVariant\uff0fInteger\u300d\u306b\u5909\u66f4\u3055\u308c\u308b-1.png\" alt=\"\u5909\u6570\u306b\u5024\uff08\u6570\u5b57\u306e\u300c1\u300d\uff09\u304c\u8a2d\u5b9a\u3055\u308c\u308b\u3068\u3001\u300cVariant\uff0fInteger\u300d\u306b\u5909\u66f4\u3055\u308c\u308b\" width=\"1012\" height=\"367\" class=\"alignnone size-full wp-image-4394\" srcset=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u5909\u6570\u306b\u5024\uff08\u6570\u5b57\u306e\u300c1\u300d\uff09\u304c\u8a2d\u5b9a\u3055\u308c\u308b\u3068\u3001\u300cVariant\uff0fInteger\u300d\u306b\u5909\u66f4\u3055\u308c\u308b-1.png 1012w, https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u5909\u6570\u306b\u5024\uff08\u6570\u5b57\u306e\u300c1\u300d\uff09\u304c\u8a2d\u5b9a\u3055\u308c\u308b\u3068\u3001\u300cVariant\uff0fInteger\u300d\u306b\u5909\u66f4\u3055\u308c\u308b-1-768x279.png 768w\" sizes=\"(max-width: 1012px) 100vw, 1012px\" \/><\/a><\/p>\n<h4>\uff12-\uff12-\uff12\uff0e\u8907\u6570\u306e\u5909\u6570\u5ba3\u8a00\u3092\u3001<span>1<\/span>\u884c\u3067\u884c\u3046<\/h4>\n<p>\u5909\u6570\u306e\u5ba3\u8a00\u306f\u3001\uff11\u884c\u3067\u9023\u7d9a\u3057\u3066\u884c\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Sub sample2()\r\n    Dim var1, var2, var3 As Integer\r\n\r\n    var1 = \"999\"\r\n    var2 = 999\r\n    var3 = 123\r\n\r\nEnd Sub<\/pre>\n<p>\u5b9f\u884c\u6642\u306b\u3001<span>var1<\/span>\u3001<span>var2<\/span>\u306e\u30a6\u30a9\u30c3\u30c1\u5185\u306e\u578b\u304c\u300c<span>Variant<\/span>\uff0f<strong>Empty<\/strong>\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff08<span>Empty<\/span>\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u306f\u3001\u5024\u304c\u5165\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u578b\u304c\u672a\u5b9a\u306e\u305f\u3081\uff09<\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/vba-dim\/var1%e3%80%81var2%e3%81%ae%e3%82%a6%e3%82%a9%e3%83%83%e3%83%81%e5%86%85%e3%81%ae%e5%9e%8b%e3%81%8c%e3%80%8cvariant%ef%bc%8fempty%e3%80%8d%e3%81%ab%e3%81%aa%e3%81%a3%e3%81%a6%e3%81%84%e3%81%be%e3%81%99\" rel=\"attachment wp-att-4395\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/var1\u3001var2\u306e\u30a6\u30a9\u30c3\u30c1\u5185\u306e\u578b\u304c\u300cVariant\uff0fEmpty\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059.png\" alt=\"var1\u3001var2\u306e\u30a6\u30a9\u30c3\u30c1\u5185\u306e\u578b\u304c\u300cVariant\uff0fEmpty\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059\" width=\"1133\" height=\"339\" class=\"alignnone size-full wp-image-4395\" srcset=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/var1\u3001var2\u306e\u30a6\u30a9\u30c3\u30c1\u5185\u306e\u578b\u304c\u300cVariant\uff0fEmpty\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059.png 1133w, https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/var1\u3001var2\u306e\u30a6\u30a9\u30c3\u30c1\u5185\u306e\u578b\u304c\u300cVariant\uff0fEmpty\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059-1024x306.png 1024w, https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/var1\u3001var2\u306e\u30a6\u30a9\u30c3\u30c1\u5185\u306e\u578b\u304c\u300cVariant\uff0fEmpty\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059-768x230.png 768w\" sizes=\"(max-width: 1133px) 100vw, 1133px\" \/><\/a><\/p>\n<p>Var1\u306b\u6587\u5b57\u5217\u306e\u300c<span>999<\/span>\u300d\u3001<span>var2<\/span>\u306b\u6570\u5b57\u306e\u300c<span>999<\/span>\u300d\u3092\u8a2d\u5b9a\u3055\u308c\u308b\u3068\u3001<span>var1<\/span>\u306e\u578b\u304c\u300c<span>Variant\/<\/span><strong>String<\/strong>\u300d\u3001<span>var2<\/span>\u306e\u578b\u304c\u300c<span>Variant\/<strong>Integer<\/strong><\/span>\u300d\u306b\u5909\u66f4\u3055\u308c\u308b\u3002<\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/vba-dim\/var1%e3%81%ab%e6%96%87%e5%ad%97%e5%88%97%e3%81%ae%e3%80%8c999%e3%80%8d%e3%80%81var2%e3%81%ab%e6%95%b0%e5%ad%97%e3%81%ae%e3%80%8c999%e3%80%8d%e3%82%92%e8%a8%ad%e5%ae%9a%e3%81%95%e3%82%8c%e3%82%8b\" rel=\"attachment wp-att-4396\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/Var1\u306b\u6587\u5b57\u5217\u306e\u300c999\u300d\u3001var2\u306b\u6570\u5b57\u306e\u300c999\u300d\u3092\u8a2d\u5b9a\u3055\u308c\u308b\u3068\u3001var1\u306e\u578b\u304c\u300cVariant\uff0fString\u300d\u3001var2\u306e\u578b\u304c\u300cVariant\uff0fInteger\u300d\u306b\u5909\u66f4\u3055\u308c\u308b.png\" alt=\"Var1\u306b\u6587\u5b57\u5217\u306e\u300c999\u300d\u3001var2\u306b\u6570\u5b57\u306e\u300c999\u300d\u3092\u8a2d\u5b9a\u3055\u308c\u308b\u3068\u3001var1\u306e\u578b\u304c\u300cVariant\uff0fString\u300d\u3001var2\u306e\u578b\u304c\u300cVariant\uff0fInteger\u300d\u306b\u5909\u66f4\u3055\u308c\u308b\" width=\"1112\" height=\"350\" class=\"alignnone size-full wp-image-4396\" srcset=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/Var1\u306b\u6587\u5b57\u5217\u306e\u300c999\u300d\u3001var2\u306b\u6570\u5b57\u306e\u300c999\u300d\u3092\u8a2d\u5b9a\u3055\u308c\u308b\u3068\u3001var1\u306e\u578b\u304c\u300cVariant\uff0fString\u300d\u3001var2\u306e\u578b\u304c\u300cVariant\uff0fInteger\u300d\u306b\u5909\u66f4\u3055\u308c\u308b.png 1112w, https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/Var1\u306b\u6587\u5b57\u5217\u306e\u300c999\u300d\u3001var2\u306b\u6570\u5b57\u306e\u300c999\u300d\u3092\u8a2d\u5b9a\u3055\u308c\u308b\u3068\u3001var1\u306e\u578b\u304c\u300cVariant\uff0fString\u300d\u3001var2\u306e\u578b\u304c\u300cVariant\uff0fInteger\u300d\u306b\u5909\u66f4\u3055\u308c\u308b-1024x322.png 1024w, https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/Var1\u306b\u6587\u5b57\u5217\u306e\u300c999\u300d\u3001var2\u306b\u6570\u5b57\u306e\u300c999\u300d\u3092\u8a2d\u5b9a\u3055\u308c\u308b\u3068\u3001var1\u306e\u578b\u304c\u300cVariant\uff0fString\u300d\u3001var2\u306e\u578b\u304c\u300cVariant\uff0fInteger\u300d\u306b\u5909\u66f4\u3055\u308c\u308b-768x242.png 768w\" sizes=\"(max-width: 1112px) 100vw, 1112px\" \/><\/a><\/p>\n<h3><span id=\"i-3\">\uff12-\uff13\uff0e\u81ea\u52d5\u578b\u5909\u63db<\/span><\/h3>\n<p>\u5ba3\u8a00\u3057\u305f\u5909\u6570\u306e\u30c7\u30fc\u30bf\u578b\u3068\u306f\u7570\u306a\u308b\u30c7\u30fc\u30bf\u578b\u3092\u8a2d\u5b9a\u3057\u305f\u5834\u5408\u3001\u81ea\u52d5\u7684\u306b\u5ba3\u8a00\u3057\u305f\u578b\u306b\u5909\u63db\u3057\u307e\u3059\u3002<br \/>\n\u203b2-3-1.\u6570\u5b57\u578b\u306e\u5909\u6570\u306b\u3001\u6587\u5b57\u5217\u306e\u300c<span>123<\/span>\u300d\u3092\u8a2d\u5b9a<\/p>\n<pre class=\"prettyprint lang:default decode:true\">Sub sample3()\r\n    Dim cnt As Integer\r\n    cnt = \"123\"\r\n    \r\nEnd Sub<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a\u6570\u5b57\u306e\u300c<span>123<\/span>\u300d\u304c\u8a2d\u5b9a\u3055\u308c\u308b<\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/vba-dim\/%e5%ae%9f%e8%a1%8c%e7%b5%90%e6%9e%9c%ef%bc%9a%e6%95%b0%e5%ad%97%e3%81%ae%e3%80%8c123%e3%80%8d%e3%81%8c%e8%a8%ad%e5%ae%9a%e3%81%95%e3%82%8c%e3%82%8b\" rel=\"attachment wp-att-4397\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u5b9f\u884c\u7d50\u679c\uff1a\u6570\u5b57\u306e\u300c123\u300d\u304c\u8a2d\u5b9a\u3055\u308c\u308b.png\" alt=\"\u5b9f\u884c\u7d50\u679c\uff1a\u6570\u5b57\u306e\u300c123\u300d\u304c\u8a2d\u5b9a\u3055\u308c\u308b\" width=\"555\" height=\"243\" class=\"alignnone size-full wp-image-4397\" \/><\/a><\/p>\n<h4>\uff12-\uff13-\uff12\uff0e\u6587\u5b57\u5217\u578b\u306e\u5909\u6570\u306b\u3001\u6570\u5b57\u306e\u300c<span>123<\/span>\u300d\u3092\u8a2d\u5b9a<\/h4>\n<pre class=\"prettyprint lang:default decode:true\">Sub sample4()\r\n    Dim cnt As String  '\u6587\u5b57\u5217\u578b\u3067\u5909\u6570\u3092\u5b9a\u7fa9\r\n    cnt = 123          '\u6570\u5b57\u306e\u300c123\u300d\u3092\u8a2d\u5b9a\r\n    \r\nEnd Sub<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a\u6587\u5b57\u5217\u306e\u300c<span>123<\/span>\u300d\u304c\u8a2d\u5b9a\u3055\u308c\u308b<\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/vba-dim\/%e5%ae%9f%e8%a1%8c%e7%b5%90%e6%9e%9c%ef%bc%9a%e6%96%87%e5%ad%97%e5%88%97%e3%81%ae%e3%80%8c123%e3%80%8d%e3%81%8c%e8%a8%ad%e5%ae%9a%e3%81%95%e3%82%8c%e3%82%8b\" rel=\"attachment wp-att-4398\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u5b9f\u884c\u7d50\u679c\uff1a\u6587\u5b57\u5217\u306e\u300c123\u300d\u304c\u8a2d\u5b9a\u3055\u308c\u308b.png\" alt=\"\u5b9f\u884c\u7d50\u679c\uff1a\u6587\u5b57\u5217\u306e\u300c123\u300d\u304c\u8a2d\u5b9a\u3055\u308c\u308b\" width=\"741\" height=\"318\" class=\"alignnone size-full wp-image-4398\" \/><\/a><\/p>\n<h4>\uff12-\uff13-\uff13\uff0e\u6570\u5024\u578b\u306e\u5909\u6570\u306b\u3001\u5c0f\u6570\u70b9\u3042\u308a\u306e\u6574\u6570\u3092\u8a2d\u5b9a<\/h4>\n<pre class=\"prettyprint lang:default decode:true\">Sub sample5()\r\n    Dim cnt As Integer  '\u6570\u5024\u578b\u3067\u5909\u6570\u3092\u5b9a\u7fa9\r\n    cnt = 123.24        '\u6570\u5b57\u306e\u300c123.24\u300d\u3092\u8a2d\u5b9a\r\n    \r\nEnd Sub<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a\u5c0f\u6570\u70b9\u306a\u3057\u306e\u6574\u6570\u304c\u8a2d\u5b9a\u3055\u308c\u308b<\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/vba-dim\/%e5%ae%9f%e8%a1%8c%e7%b5%90%e6%9e%9c%ef%bc%9a%e5%b0%8f%e6%95%b0%e7%82%b9%e3%81%aa%e3%81%97%e3%81%ae%e6%95%b4%e6%95%b0%e3%81%8c%e8%a8%ad%e5%ae%9a%e3%81%95%e3%82%8c%e3%82%8b\" rel=\"attachment wp-att-4399\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u5b9f\u884c\u7d50\u679c\uff1a\u5c0f\u6570\u70b9\u306a\u3057\u306e\u6574\u6570\u304c\u8a2d\u5b9a\u3055\u308c\u308b.png\" alt=\"\u5b9f\u884c\u7d50\u679c\uff1a\u5c0f\u6570\u70b9\u306a\u3057\u306e\u6574\u6570\u304c\u8a2d\u5b9a\u3055\u308c\u308b\" width=\"764\" height=\"362\" class=\"alignnone size-full wp-image-4399\" \/><\/a><\/p>\n<h4>\uff12-\uff13-\uff14\uff0e\u6574\u6570\u578b\u306e\u5909\u6570\u306b\u3001\u6570\u5b57\u4ee5\u5916\u306e\u6587\u5b57\u5217\u300c<span>ABC<\/span>\u300d\u3092\u8a2d\u5b9a<\/h4>\n<pre class=\"prettyprint lang:default decode:true\">Sub sample6()\r\n    Dim cnt As Integer  '\u6570\u5024\u578b\u3067\u5909\u6570\u3092\u5b9a\u7fa9\r\n    cnt = \"ABC\"         '\u6587\u5b57\u5217\u306e\u300cABC\u300d\u3092\u8a2d\u5b9a\r\n    \r\nEnd Sub<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a\u5909\u63db\u3067\u304d\u306a\u3044\u30d1\u30bf\u30fc\u30f3\u3067\u306f\u3001\u300c\u578b\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002\u300d\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/vba-dim\/%e5%ae%9f%e8%a1%8c%e7%b5%90%e6%9e%9c%ef%bc%9a%e5%a4%89%e6%8f%9b%e3%81%a7%e3%81%8d%e3%81%aa%e3%81%84%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%81%a7%e3%81%af%e3%80%81%e3%80%8c%e5%9e%8b%e3%81%8c%e4%b8%80\" rel=\"attachment wp-att-4400\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u5b9f\u884c\u7d50\u679c\uff1a\u5909\u63db\u3067\u304d\u306a\u3044\u30d1\u30bf\u30fc\u30f3\u3067\u306f\u3001\u300c\u578b\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002\u300d\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002.png\" alt=\"\u5b9f\u884c\u7d50\u679c\uff1a\u5909\u63db\u3067\u304d\u306a\u3044\u30d1\u30bf\u30fc\u30f3\u3067\u306f\u3001\u300c\u578b\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002\u300d\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002\" width=\"488\" height=\"242\" class=\"alignnone size-full wp-image-4400\" \/><\/a><\/p>\n<h3><span id=\"i-4\">\uff12-\uff14\uff0e\u305d\u306e\u4ed6\u306e\u4f7f\u7528\u4f8b<\/span><\/h3>\n<h4>\uff12-\uff14-\uff11\uff0e\u5909\u6570\u3092\u5ba3\u8a00\u3057\u306a\u3044\u3067\u4f7f\u7528<\/h4>\n<pre class=\"prettyprint lang:default decode:true\">Sub sample7()\r\n    Dim cnt As Integer  '\u5909\u6570\u5b9a\u7fa9\u3092\u30b3\u30e1\u30f3\u30c8\r\n    cnt1 = 123          '\u6570\u5b57\u306e\u300c123\u300d\u3092\u8a2d\u5b9a\r\n    \r\n    MsgBox \"cnt = \" &amp; cnt\r\nEnd Sub<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a\u5b9a\u7fa9\u3057\u3066\u3044\u306a\u3044\u5909\u6570\uff08<span>cnt<\/span>\uff09\u306b\u5024\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.bold.ne.jp\/engineer-club\/vba-dim\/%e5%ae%9f%e8%a1%8c%e7%b5%90%e6%9e%9c%ef%bc%9a%e5%ae%9a%e7%be%a9%e3%81%97%e3%81%a6%e3%81%84%e3%81%aa%e3%81%84%e5%a4%89%e6%95%b0%ef%bc%88cnt%ef%bc%89%e3%81%ab%e5%80%a4%e3%81%8c%e8%a8%ad%e5%ae%9a\" rel=\"attachment wp-att-4401\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u5b9f\u884c\u7d50\u679c\uff1a\u5b9a\u7fa9\u3057\u3066\u3044\u306a\u3044\u5909\u6570\uff08cnt\uff09\u306b\u5024\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059.png\" alt=\"\u5b9f\u884c\u7d50\u679c\uff1a\u5b9a\u7fa9\u3057\u3066\u3044\u306a\u3044\u5909\u6570\uff08cnt\uff09\u306b\u5024\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\" width=\"926\" height=\"312\" class=\"alignnone size-full wp-image-4401\" srcset=\"https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u5b9f\u884c\u7d50\u679c\uff1a\u5b9a\u7fa9\u3057\u3066\u3044\u306a\u3044\u5909\u6570\uff08cnt\uff09\u306b\u5024\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059.png 926w, https:\/\/www.bold.ne.jp\/engineer-club\/wp-content\/uploads\/2024\/06\/\u5b9f\u884c\u7d50\u679c\uff1a\u5b9a\u7fa9\u3057\u3066\u3044\u306a\u3044\u5909\u6570\uff08cnt\uff09\u306b\u5024\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059-768x259.png 768w\" sizes=\"(max-width: 926px) 100vw, 926px\" \/><\/a><\/p>\n<p>\u5b9a\u7fa9\u3092\u3057\u3066\u3044\u306a\u3044\u5909\u6570\u3067\u3082\u3001\u30a8\u30e9\u30fc\u306b\u306a\u3089\u305a\u306b\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u3066\u3044\u307e\u3059\u3002\u5b9a\u7fa9\u3057\u305f\u5909\u6570\u540d\u3092\u6253\u3061\u9593\u9055\u3048\u3066<span>VBA<\/span>\u3092\u4f5c\u3063\u305f\u5834\u5408\u3001\u610f\u56f3\u3057\u306a\u3044\u52d5\u304d\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2><span id=\"i-5\">\uff13\uff0e\u6700\u5f8c\u306b<\/span><\/h2>\n<p>\u578b\u306e\u81ea\u52d5\u5909\u63db\u3084\u672a\u5b9a\u7fa9\u306e\u5909\u6570\u304c\u4f7f\u7528\u3067\u304d\u308b\u7b49\u3001\u30a8\u30e9\u30fc\u539f\u56e0\u306b\u3082\u306a\u308a\u305d\u3046\u306a\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3046\u307e\u304f\u4f7f\u3044\u3053\u306a\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VBA\u306b\u89e6\u308c\u308b\u969b\u306b\u3001\u5fc5\u305a\u3068\u3044\u3044\u3063\u3066\u3044\u3044\u307b\u3069\u898b\u304b\u3051\u308b\u306e\u304c\u300cDim\u300d\u3068\u3044\u3046\u6587\u5b57\u5217\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u3001Dim\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002 \u76ee\u6b21\uff11\uff0eVBA\u306eDim\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306b\u3064\u3044\u3066\uff11-\uff11\uff0eDim\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3068\u306f\uff11 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":4402,"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\/4389"}],"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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/comments?post=4389"}],"version-history":[{"count":8,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts\/4389\/revisions"}],"predecessor-version":[{"id":6255,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/posts\/4389\/revisions\/6255"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/media\/4402"}],"wp:attachment":[{"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/media?parent=4389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bold.ne.jp\/engineer-club\/wp-json\/wp\/v2\/categories?post=4389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}