{"id":355,"date":"2019-10-26T13:34:06","date_gmt":"2019-10-26T13:34:06","guid":{"rendered":"http:\/\/shunichi.hosono.com\/?p=355"},"modified":"2020-01-09T12:34:05","modified_gmt":"2020-01-09T12:34:05","slug":"%e3%83%81%e3%83%a3%e3%83%bc%e3%83%88%e3%82%ae%e3%83%a3%e3%83%a9%e3%83%aa%e3%83%bc%e3%81%ae%e6%a0%aa%e4%be%a1%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92-excel%e3%81%8b%e3%82%89%e3%83%94%e3%83%b3%e3%83%9d","status":"publish","type":"post","link":"https:\/\/shunichi.hosono.com\/?p=355","title":{"rendered":"\u30c1\u30e3\u30fc\u30c8\u30ae\u30e3\u30e9\u30ea\u30fc\u306e\u682a\u4fa1\u30c7\u30fc\u30bf\u3092 EXCEL\u304b\u3089\u30d4\u30f3\u30dd\u30a4\u30f3\u30c8\u3067\u53c2\u7167\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><a href=\"https:\/\/www.panrolling.com\/pansoft\/chtgal\/\" target=\"_blank\" rel=\"noopener\">\u30d1\u30f3\u30ed\u30fc\u30ea\u30f3\u30b0\u793e\u306e\u300c\u30c1\u30e3\u30fc\u30c8\u30ae\u30e3\u30e9\u30ea\u30fc\u300d<\/a> \u3068\u3044\u3046\u30bd\u30d5\u30c8\u306f\u3001<br \/>\n\u5168\u9298\u67c4\u306e\u682a\u4fa1\u3092\u904e\u53bb\uff13\uff10\u5e74\u5206\u6301\u3063\u3066\u3044\u3066\u3001\u305d\u306e\u30c7\u30fc\u30bf\u3092\u3001<br \/>\nActiveX\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb \u3067\u3001VB \u3084 EXCEL\u7b49\u3067\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>\u3068\u3053\u308d\u304c\u3001\u3053\u306e\u6a5f\u80fd\u306b\u3064\u3044\u3066\u306f\u3001<br \/>\n\u30bd\u30d5\u30c8\u306e\u30d8\u30eb\u30d7\u753b\u9762\u306b\u306f\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u304c\u3001<br \/>\n\u305d\u308c\u4ee5\u5916\u306e\u60c5\u5831\u304c\u3042\u307e\u308a\u306a\u304f\u3001<br \/>\n\u6d3b\u7528\u3057\u3066\u3044\u308b\u4eba\u306f\u591a\u304f\u306a\u3044\u3068\u601d\u3046\u3002<\/p>\n<p>\u30d1\u30f3\u30ed\u30fc\u30ea\u30f3\u30b0\u793e\u306e\u30b5\u30a4\u30c8\u3067\u3001<br \/>\n\u7121\u6599\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u3001<br \/>\n<a href=\"https:\/\/www.panrolling.com\/etc\/users\/sakurai\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.panrolling.com\/etc\/users\/sakurai\/<\/a><br \/>\n\u306e\u30b5\u30a4\u30c8\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u3051\u3069\u3001<\/p>\n<p>\u682a\u4fa1\u3092\u4e00\u62ec\u3067\u8aad\u307f\u51fa\u3059\u65b9\u6cd5\u306f\u53c2\u8003\u306b\u306a\u308b\u3051\u308c\u3069\u3082\u3001<br \/>\n\u30d4\u30f3\u30dd\u30a4\u30f3\u30c8\u3067\u3001\u305f\u3068\u3048\u3070<\/p>\n<p>\u30fb\u300c9101 \u65e5\u672c\u90f5\u8239\u300d\u306e \u300c2019\u5e747\u670817\u65e5\u300d\u306e\u300c\u7d42\u5024\u300d\u3092\u53c2\u7167\u3057\u305f\u3044<\/p>\n<p>\u3068\u3044\u3046\u3088\u3046\u306a\u5834\u9762\u3067\u3001\u3069\u3046\u4f7f\u3048\u3070\u3088\u3044\u306e\u304b\u3001\u5206\u304b\u308a\u3065\u3089\u3044\u3002<\/p>\n<p>\u30e1\u30bf\u30c8\u30ec\u30fc\u30c0\u30fc\u7b49\u3001\u4ed6\u306e\u30bd\u30d5\u30c8\u3068\u306f\u9055\u3063\u3066\u3001<br \/>\n\u300c\u30c1\u30e3\u30fc\u30c8\u30ae\u30e3\u30e9\u30ea\u30fc\u300d\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u5c02\u9580\u5bb6\u3067\u306a\u304f\u3066\u3082<\/p>\n<p>EXCEL\u304b\u3089\u6c17\u8efd\u306b\u682a\u4fa1\u30c7\u30fc\u30bf\u3092\u30d4\u30f3\u30dd\u30a4\u30f3\u30c8\u3067\u53c2\u7167\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b<\/p>\n<p>\u3068\u3044\u3046\u306e\u304c\u7279\u9577\u3067\u3042\u3063\u3066\u307b\u3057\u3044 \u3068\u601d\u3046\u3002<\/p>\n<p>\u5148\u9031\u3001\u79c1\u304c\u3061\u3087\u3063\u3068\u4f5c\u3063\u3066\u307f\u305f\u306e\u3067\u3001<br \/>\n\u30ce\u30a6\u30cf\u30a6\u3092\u5171\u6709\u3057\u3066\u304a\u3053\u3046\u3068\u601d\u3046\u3002<\/p>\n<p>\u300cEXCEL\u306e\u95a2\u6570\u300d\u3092\u4f5c\u3063\u3066\u304a\u3051\u3070\u6c17\u8efd\u306b\u4f7f\u3048\u308b\u3001<\/p>\n<p>\u306e\u3067\u3001\u72ec\u81ea\u95a2\u6570\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3066\u304a\u3051\u3070\u3088\u3044\u3001\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308b\u3002<\/p>\n<p>\u6b21\u306e\u3088\u3046\u306a\u6e96\u5099\u306e\u5f8c\u306b\u3001<\/p>\n<p>\u30fbEXCEL\u306e\u300c\u958b\u767a\u300d\u30bf\u30d6\u306e\u300cVisual Basic\u300d\u3092\u9078\u629e<\/p>\n<p><a href=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel1.png\"><img loading=\"lazy\" class=\"wp-image-357 size-large\" src=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel1-1024x130.png\" alt=\"Visual Basic \u8a2d\u5b9a\" width=\"1024\" height=\"130\" srcset=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel1-1024x130.png 1024w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel1-300x38.png 300w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel1-768x97.png 768w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel1-600x76.png 600w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel1.png 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u30fb\u30de\u30af\u30ed\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u62bc\u3057\u3066\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30bb\u30f3\u30bf\u30fc\u3092\u8868\u793a<\/p>\n<p><a href=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel3.png\"><img loading=\"lazy\" class=\"wp-image-367 size-large\" src=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel3-1024x209.png\" alt=\"\u30de\u30af\u30ed\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\" width=\"1024\" height=\"209\" srcset=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel3-1024x209.png 1024w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel3-300x61.png 300w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel3-768x157.png 768w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel3-600x123.png 600w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel3.png 1100w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u30fbActiveX \u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d<\/p>\n<p><a href=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel4.png\"><img loading=\"lazy\" class=\"wp-image-366 size-full\" src=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel4.png\" alt=\"ActiveX\u306e\u8a2d\u5b9a\" width=\"931\" height=\"230\" srcset=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel4.png 931w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel4-300x74.png 300w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel4-768x190.png 768w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel4-600x148.png 600w\" sizes=\"(max-width: 931px) 100vw, 931px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u30fb\u30de\u30af\u30ed\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d<\/p>\n<p><a href=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel5.png\"><img loading=\"lazy\" class=\"wp-image-365 size-full\" src=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel5.png\" alt=\"\u30de\u30af\u30ed\u306e\u8a2d\u5b9a\" width=\"928\" height=\"229\" srcset=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel5.png 928w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel5-300x74.png 300w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel5-768x190.png 768w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel5-600x148.png 600w\" sizes=\"(max-width: 928px) 100vw, 928px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u30fbVBA\u306e\u958b\u767a\u753b\u9762\u3067\u3001\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u8ffd\u52a0\u3057\u3066\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u63cf\u304d\u8fbc\u3080\u3002<\/p>\n<p><a href=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel2.png\"><img loading=\"lazy\" class=\"alignnone wp-image-356 size-full\" src=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel2.png\" alt=\"\" width=\"719\" height=\"531\" srcset=\"https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel2.png 719w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel2-300x222.png 300w, https:\/\/shunichi.hosono.com\/wp-content\/uploads\/2019\/10\/20191026excel2-600x443.png 600w\" sizes=\"(max-width: 719px) 100vw, 719px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u305d\u306e\u5f8c\u306b\u3001\u4ee5\u4e0b\u306e\u95a2\u6570\u3092\u8cbc\u308a\u4ed8\u3051\u308c\u3070\u3088\u3044\u3002<br \/>\n\u6025\u3044\u3067\u4f5c\u3063\u305f\u306e\u3067\u3001\u672c\u683c\u7684\u306b\u4f7f\u3046\u306b\u306f\u3001\u30a2\u30ec\u30f3\u30b8\u306f\u5fc5\u8981\u304b\u3068\u601d\u3046\u3002<\/p>\n<p>\u95a2\u6570\u306e\u4e00\u89a7<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td width=\"217\">\u6a5f\u80fd<\/td>\n<td width=\"72\">\u95a2\u6570\u540d<\/td>\n<td width=\"270\">\u5f15\u6570<\/td>\n<td width=\"419\">\u8a18\u8ff0\u4f8b<\/td>\n<\/tr>\n<tr>\n<td>\u5f53\u65e5\u306e\u59cb\u5024\u3092\u6c42\u3081\u308b<\/td>\n<td>yori<\/td>\n<td>(\u9298\u67c4\u30b3\u30fc\u30c9, \u53d6\u5f15\u65e5)<\/td>\n<td>=yori(1001, DATEVALUE(&#8220;2019\/7\/16&#8221;))<\/td>\n<\/tr>\n<tr>\n<td>\u5f53\u65e5\u306e\u9ad8\u5024\u3092\u6c42\u3081\u308b<\/td>\n<td>taka<\/td>\n<td>(\u9298\u67c4\u30b3\u30fc\u30c9, \u53d6\u5f15\u65e5)<\/td>\n<td>=taka(1001, DATEVALUE(&#8220;2019\/7\/16&#8221;))<\/td>\n<\/tr>\n<tr>\n<td>\u5f53\u65e5\u306e\u5b89\u5024\u3092\u6c42\u3081\u308b<\/td>\n<td>yasu<\/td>\n<td>(\u9298\u67c4\u30b3\u30fc\u30c9, \u53d6\u5f15\u65e5)<\/td>\n<td>=yasu(1001, DATEVALUE(&#8220;2019\/7\/16&#8221;))<\/td>\n<\/tr>\n<tr>\n<td>\u5f53\u65e5\u306e\u7d42\u5024\u3092\u6c42\u3081\u308b<\/td>\n<td>hike<\/td>\n<td>(\u9298\u67c4\u30b3\u30fc\u30c9, \u53d6\u5f15\u65e5)<\/td>\n<td>=hike(1001, DATEVALUE(&#8220;2019\/7\/16&#8221;))<\/td>\n<\/tr>\n<tr>\n<td>\u7fcc\u55b6\u696d\u65e5\u306e\u59cb\u5024\u3092\u6c42\u3081\u308b<\/td>\n<td>yokuyori<\/td>\n<td>(\u9298\u67c4\u30b3\u30fc\u30c9, \u53d6\u5f15\u65e5)<\/td>\n<td>=yokuyori(1001, DATEVALUE(&#8220;2019\/7\/16&#8221;))<\/td>\n<\/tr>\n<tr>\n<td>\u7fcc\u55b6\u696d\u65e5\u306e\u7d42\u5024\u3092\u6c42\u3081\u308b<\/td>\n<td>yokuhike<\/td>\n<td>(\u9298\u67c4\u30b3\u30fc\u30c9, \u53d6\u5f15\u65e5)<\/td>\n<td>=yokuhike(1001, DATEVALUE(&#8220;2019\/7\/16&#8221;))<\/td>\n<\/tr>\n<tr>\n<td>N\u55b6\u696d\u65e5\u5f8c\u3092\u6c42\u3081\u308b<\/td>\n<td>kdate<\/td>\n<td>(\u9298\u67c4\u30b3\u30fc\u30c9, \u53d6\u5f15\u65e5, \u52a0\u7b97\u65e5\u6570N )<\/td>\n<td>=kdate(1001, DATEVALUE(&#8220;2019\/7\/16&#8221;), 1)<\/td>\n<\/tr>\n<tr>\n<td>\u9298\u67c4\u540d\u3092\u6c42\u3081\u308b<\/td>\n<td>kname<\/td>\n<td>(\u9298\u67c4\u30b3\u30fc\u30c9)<\/td>\n<td>=kname(1001)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<hr \/>\n<pre>'\u5f53\u65e5\u59cb\u5024\r\nPublic Function yori(kcode As String, kdate As Date) As Long\r\n\r\n    Dim Calendar As New ActiveMarket.Calendar\r\n    Dim Prices As New ActiveMarket.Prices\r\n    Dim DatePos As Long\r\n    \r\n    DatePos = Calendar.DatePosition(kdate, 1)\r\n    \r\n    Prices.AdjustExRights = True\r\n    Prices.Read kcode\r\n       \r\n    '\u7fcc\u65e5\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n    If Prices.IsClosed(DatePos) Then\r\n       DatePos = DatePos + 1\r\n       \r\n       '2\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n       If Prices.IsClosed(DatePos) Then\r\n          DatePos = DatePos + 1\r\n                \r\n          '3\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n          If Prices.IsClosed(DatePos) Then\r\n             DatePos = DatePos + 1\r\n          \r\n          End If\r\n       End If\r\n    End If\r\n    \r\n    yori = Prices.Open(DatePos)\r\n\r\nEnd Function\r\n\r\n'\u5f53\u65e5\u9ad8\u5024\r\nPublic Function taka(kcode As String, kdate As Date) As Long\r\n\r\n    Dim Calendar As New ActiveMarket.Calendar\r\n    Dim Prices As New ActiveMarket.Prices\r\n    Dim DatePos As Long\r\n    \r\n    DatePos = Calendar.DatePosition(kdate, 1)\r\n    \r\n    Prices.AdjustExRights = True\r\n    Prices.Read kcode\r\n       \r\n    '\u7fcc\u65e5\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n    If Prices.IsClosed(DatePos) Then\r\n       DatePos = DatePos + 1\r\n       \r\n       '2\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n       If Prices.IsClosed(DatePos) Then\r\n          DatePos = DatePos + 1\r\n                \r\n          '3\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n          If Prices.IsClosed(DatePos) Then\r\n             DatePos = DatePos + 1\r\n          \r\n          End If\r\n       End If\r\n    End If\r\n    \r\n    taka = Prices.High(DatePos)\r\n\r\nEnd Function\r\n\r\n'\u5f53\u65e5\u5b89\u5024\r\nPublic Function yasu(kcode As String, kdate As Date) As Long\r\n\r\n    Dim Calendar As New ActiveMarket.Calendar\r\n    Dim Prices As New ActiveMarket.Prices\r\n    Dim DatePos As Long\r\n    \r\n    DatePos = Calendar.DatePosition(kdate, 1)\r\n    \r\n    Prices.AdjustExRights = True\r\n    Prices.Read kcode\r\n       \r\n    '\u7fcc\u65e5\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n    If Prices.IsClosed(DatePos) Then\r\n       DatePos = DatePos + 1\r\n       \r\n       '2\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n       If Prices.IsClosed(DatePos) Then\r\n          DatePos = DatePos + 1\r\n                \r\n          '3\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n          If Prices.IsClosed(DatePos) Then\r\n             DatePos = DatePos + 1\r\n          \r\n          End If\r\n       End If\r\n    End If\r\n    \r\n    yasu = Prices.Low(DatePos)\r\n\r\nEnd Function\r\n\r\n'\u5f53\u65e5\u7d42\u5024\r\nPublic Function hike(kcode As String, kdate As Date) As Long\r\n\r\n    Dim Calendar As New ActiveMarket.Calendar\r\n    Dim Prices As New ActiveMarket.Prices\r\n    Dim DatePos As Long\r\n    \r\n    DatePos = Calendar.DatePosition(kdate, 1)\r\n    \r\n    Prices.AdjustExRights = True\r\n    Prices.Read kcode\r\n       \r\n    '\u7fcc\u65e5\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n    If Prices.IsClosed(DatePos) Then\r\n       DatePos = DatePos + 1\r\n       \r\n       '2\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n       If Prices.IsClosed(DatePos) Then\r\n          DatePos = DatePos + 1\r\n                \r\n          '3\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n          If Prices.IsClosed(DatePos) Then\r\n             DatePos = DatePos + 1\r\n          \r\n          End If\r\n       End If\r\n    End If\r\n    \r\n    hike = Prices.Close(DatePos)\r\n\r\nEnd Function\r\n\r\n'\u7fcc\u55b6\u696d\u65e5\u306e\u59cb\u5024\r\nPublic Function yokuyori(kcode As String, kdate As Date) As Long\r\n\r\n    Dim Calendar As New ActiveMarket.Calendar\r\n    Dim Prices As New ActiveMarket.Prices\r\n    Dim DatePos As Long\r\n    \r\n    DatePos = Calendar.DatePosition(kdate, 1) + 1\r\n    \r\n    Prices.AdjustExRights = True\r\n    Prices.Read kcode\r\n       \r\n    '\u7fcc\u65e5\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n    If Prices.IsClosed(DatePos) Then\r\n       DatePos = DatePos + 1\r\n       \r\n       '2\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n       If Prices.IsClosed(DatePos) Then\r\n          DatePos = DatePos + 1\r\n                \r\n          '3\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n          If Prices.IsClosed(DatePos) Then\r\n             DatePos = DatePos + 1\r\n          \r\n          End If\r\n       End If\r\n    End If\r\n    \r\n    yokuyori = Prices.Open(DatePos)\r\n\r\nEnd Function\r\n\r\n'\u7fcc\u55b6\u696d\u65e5\u306e\u7d42\u5024\r\nPublic Function yokuhike(kcode As String, kdate As Date) As Long\r\n\r\n    Dim Calendar As New ActiveMarket.Calendar\r\n    Dim Prices As New ActiveMarket.Prices\r\n    Dim DatePos As Long\r\n    \r\n    DatePos = Calendar.DatePosition(kdate, 1) + 1\r\n    \r\n    Prices.AdjustExRights = True\r\n    Prices.Read kcode\r\n       \r\n    '\u7fcc\u65e5\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n    If Prices.IsClosed(DatePos) Then\r\n       DatePos = DatePos + 1\r\n       \r\n       '2\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n       If Prices.IsClosed(DatePos) Then\r\n          DatePos = DatePos + 1\r\n                \r\n          '3\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n          If Prices.IsClosed(DatePos) Then\r\n             DatePos = DatePos + 1\r\n          \r\n          End If\r\n       End If\r\n    End If\r\n    \r\n    yokuhike = Prices.Close(DatePos)\r\n\r\nEnd Function\r\n\r\n'\u53d6\u5f15\u65e5\r\nPublic Function kdate(kcode As String, startdate As Date, addcount As Integer) As Long\r\n\r\n    Dim Calendar As New ActiveMarket.Calendar\r\n    Dim Prices As New ActiveMarket.Prices\r\n    Dim DatePos As Long\r\n    \r\n    DatePos = Calendar.DatePosition(startdate, 1) + addcount\r\n    \r\n    Prices.AdjustExRights = True\r\n    Prices.Read kcode\r\n    \r\n    '\u7fcc\u65e5\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n    If Prices.IsClosed(DatePos) Then\r\n       DatePos = DatePos + 1\r\n       \r\n       '2\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n       If Prices.IsClosed(DatePos) Then\r\n          DatePos = DatePos + 1\r\n                \r\n          '3\u65e5\u5f8c\u304c\u4f11\u5834\u65e5\u306a\u3089\u3070\u3001\r\n          If Prices.IsClosed(DatePos) Then\r\n             DatePos = DatePos + 1\r\n          \r\n          End If\r\n       End If\r\n    End If\r\n    \r\n    kdate = Calendar.Date(DatePos)\r\n\r\nEnd Function\r\n\r\n'\u9298\u67c4\u540d\r\nPublic Function kname(kcode As String) As String\r\n\r\n    Dim Names As New ActiveMarket.Names\r\n    Dim C() As String, N() As String\r\n    \r\n    Names.AllNames AM_KINDFLAG_SPOTS, C, N\r\n    \r\n    mpos = Application.Match(kcode, C, False)\r\n    \r\n    If IsError(mpos) Then\r\n       kname = mpos\r\n    Else\r\n       kname = N(mpos)\r\n    End If\r\n    \r\nEnd Function\r\n<\/pre>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d1\u30f3\u30ed\u30fc\u30ea\u30f3\u30b0\u793e\u306e\u300c\u30c1\u30e3\u30fc\u30c8\u30ae\u30e3\u30e9\u30ea\u30fc\u300d \u3068\u3044\u3046\u30bd\u30d5\u30c8\u306f\u3001 \u5168\u9298\u67c4\u306e\u682a\u4fa1\u3092\u904e\u53bb\uff13\uff10\u5e74\u5206\u6301\u3063\u3066\u3044\u3066\u3001\u305d\u306e\u30c7\u30fc\u30bf\u3092\u3001 ActiveX\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb \u3067\u3001VB \u3084 EXCEL\u7b49\u3067\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002 \u3068\u3053\u308d\u304c\u3001\u3053\u306e\u6a5f\u80fd\u306b\u3064\u3044\u3066&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/shunichi.hosono.com\/?p=355\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/shunichi.hosono.com\/index.php?rest_route=\/wp\/v2\/posts\/355"}],"collection":[{"href":"https:\/\/shunichi.hosono.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shunichi.hosono.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shunichi.hosono.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/shunichi.hosono.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=355"}],"version-history":[{"count":6,"href":"https:\/\/shunichi.hosono.com\/index.php?rest_route=\/wp\/v2\/posts\/355\/revisions"}],"predecessor-version":[{"id":491,"href":"https:\/\/shunichi.hosono.com\/index.php?rest_route=\/wp\/v2\/posts\/355\/revisions\/491"}],"wp:attachment":[{"href":"https:\/\/shunichi.hosono.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shunichi.hosono.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shunichi.hosono.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}